Skip to content
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

Generic6DOFJoint is behaving in a weird manner when rotating around the Y axis (it's working properly for the Z axis) #33083

Open
Tracked by #45333
vyhgatfq opened this issue Oct 26, 2019 · 3 comments

Comments

@vyhgatfq
Copy link

Godot version:
3.1.1
OS/device including version:
Ubuntu 19.10
Issue description:
I have joined two rigid bodies (two basic capsules) together with a Generic6DOFJoint, disabled the Angular Limit Y, enabled the Angular Motor Y. The capsules started rotating, but after doing so for about 90° they snap back approx. 15° and jump around a bit.
Repeating the same procedure with the Z axis yields two properly rotating capsules without jumping and snapping.

Steps to reproduce:
Create two rigid bodies, join them with a Generic6DOFJoint, disable the Angular Limit Y, enable the Angular Motor Y, set Target Velocity to 1, observe the weirdness.
Minimal reproduction project:
joints.zip

@wombatstampede
Copy link
Contributor

wombatstampede commented Oct 28, 2019

I can acknowledge this for Bullet physics. (Didn't get the 6DOF motor running at all with - old -Godot physics.)
It is also visible in the (otherwise completely unrelated) use case here:
#28444

The motors work properly for x and z axis.

Maybe somehow similar to this one?
#18351

Edit:
Seems to be angular constraint, not motor related. Same applies when I turn off the motor and just add this to the body:

func _physics_process(delta):
	apply_torque_impulse(Vector3(0,30.0*delta,0))

I found this post (from 2012) which seems to indicate that the constraint checks use euler angles and not quaternions. If this is actually still so (which I don't know) then the weirdness would just indicate a moment of "gimbal hell".
https://pybullet.org/Bullet/phpBB3/viewtopic.php?t=8153

For now I would recommend to vyhgatfq to rotate the 6dof joint to be able to just use rotation around the x- or z-axis.

@pwab
Copy link

pwab commented Jun 12, 2020

I tested the minimal reproduction project with current Godot 3.2.1.stable and the issue is still reproducible.

@ruanrothmann
Copy link

This issue still seems to happen in 4.1 even with Jolt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants