-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rigidbody doesn't rotate when linear movement restriction on all axis is applied #36847
Comments
I believe I see your issue: you want to be able to "rotate" the door without it moving "vertically" on the y axis. I have talked with a friend of mine who studies physics, and from what I understood, you need to always unlock the y axis if you wish to have angular velocity on that axis. So, if you want the door to rotate, you'd have to allow it to move in the Y axis (even though it doesn't make much sense). I don't know if what I said above is entirely true (I'm no physics expert 😛 ), but tinkering with your project files and looking at the math, it seems like it. |
I personally think it doesn't make sense. If I want to just rotate on the y axis without actually moving, why do I have to unlock the linear movement on that axis too? |
I totally agree with you. However, I assume the code works something like this: when you lock the three axis, it means "lock all transformation on the X, Y and Z" axis. Which makes it's impossible to move and/or rotate a door, code-wise. I think, for your specific case, you need to use an HingeJoint. Now, whether this specific physics scenario makes sense or not in the context of the engine, I have no clue ¯_(ツ)_/¯ |
Yeah, I'm experimenting with the hingejoint already. |
CC @AndreaCatania to review if #38852 would address this. |
Interesting use case; However, I'm not able to reproduce it in the Godot version 4: I don't think the commit #38852 solves this problem (if confirmed) since it seems related to something other. I'm going to test it with version 3.2. However, double check that the door is not colliding with the ground. This may obstruct the movement. |
I'm not able to reproduce it with the version 3.2 too. Here my sample project, hoping it will be useful to you: |
I can reproduce the issue with the original MRP in 3.2.4 beta 5. Bullet: The player goes through the door. |
To clarify/reconcile the above repros/vs fail to repo above (on 3.4.3), the demo Andrea posted of two colliding rigid bodies works, but programmed collision from a |
@micimize in that case it'll probably get closed, as infinite inertia is no longer a thing in Godot 4.0 |
@Zireael07 updated to clarify – I'll also mention that I have been unable to find a workaround with a |
I tried to reproduce the issue in 4.1.1, converting the 3.x project posted by OP |
Godot version:
3.2 stable
OS/device including version:
Windows 10
Issue description:
rigidbody wont rotate when the linear movement on all the axis is locked
Steps to reproduce:
Minimal reproduction project:
IssueExample.zip
The text was updated successfully, but these errors were encountered: