-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Unexpected behavior with LockedAxes
and rotations after upgrading from 0.1.0
to 0.1.1
#474
Labels
A-Dynamics
Relates to rigid body dynamics: motion, mass, constraint solving, joints, CCD, and so on
C-Bug
Something isn't working
Comments
Jondolf
added
C-Bug
Something isn't working
A-Dynamics
Relates to rigid body dynamics: motion, mass, constraint solving, joints, CCD, and so on
labels
Jul 31, 2024
This was referenced Aug 11, 2024
Jondolf
pushed a commit
that referenced
this issue
Aug 19, 2024
# Objective I think that #485 wasn't quite the right fix for #474 - applying locked axes to an inertia tensor zeros out one or more of its rows, making the matrix singular - taking the inverse then results in a matrix that's all NaNs, making the delta_ang_vel also all NaNs, which causes the angular momentum to be unaffected by anything that timestep (including applied torques!). The problem with the status quo ante seems to be that a similar thing happened - rather than trying to invert the (singular) locked inverse inertia, the calculated Jacobian was (near-)singular in a lot of cases when axes were locked, and depending on round-off errors you'd either get NaNs or just an outright cancellation of the angular velocity ## Solution Calculating the delta-ω from gyroscopic effects with an unconstrained inertia matrix and *then* applying the locked axes to that angular velocity increment should be more reliable, and should avoid undesirable NaN values showing up
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-Dynamics
Relates to rigid body dynamics: motion, mass, constraint solving, joints, CCD, and so on
C-Bug
Something isn't working
Hello! I made a post in Discord, and managed to make a pretty simple reproduction of the issue. In
0.1.0
, setting theAngularVelocity
appears to function normally, but in0.1.1
, it appears to "stick" due to theLockedAxes
component, which should not be affecting the rotation.https://github.com/piedoom/av-repro
Specifically, the situation that causes the issue must have the following:
Videos of each version
0.1.0
Screen.Recording.2024-07-30.at.8.41.22.PM.mov
0.1.1
Screen.Recording.2024-07-30.at.8.41.52.PM.mov
Thank you and apologies if this is user error!
I noticed I could fix the behavior by specifying a regular transform for the entity, and then specifically adding a
Rotation
withZ
as up (though this rotates the forward vector of my object downward, which is unwanted). Anyways, I'm wondering if there's perhaps a mismatch of the transform rotation and the physics rotation that is causing thisThe text was updated successfully, but these errors were encountered: