Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Weird angular impulse behaviour (rotational inertia) #852

Closed
highdashtg opened this issue Jan 3, 2024 · 0 comments
Closed

Weird angular impulse behaviour (rotational inertia) #852

highdashtg opened this issue Jan 3, 2024 · 0 comments

Comments

@highdashtg
Copy link

Hi,

I have a simple car (half length = 3, half width = 2, half height = 0.5), with an offset center of mass -half height, copied from the Vehicle Constraints test. I am trying to rotate it around 3 axes by adding constant angular impulse (AddAngularImpulse).

Maximum angular velocity is set to 6 rad/s and I provide a large enough impulse to test how long it takes for each axis to reach the maximum angular velocity.

Due to (i am guessing here) rotational inertia (roll axis (or the long axis) being less resistant to rotation than pitch axis), it takes lesser amount of time to reach maximum angular velocity on roll axis. This sounds ok and intuitive so far. Note that at this point during my tests, the car does not have any initial rotation applied to it (it looks at the +Z direction).

However, when if i rotate the car around 90 degrees to the left or right (car's forward direction is now +X or -X) and apply a rolling impulse again, now the amount of time it takes to reach maximum angular velocity is not the same. This must be because the roll axis is now not the Z axis, but +X or -X. My guess is this is an issue of AddAngularImpulse requiring you to use "world" space and not the "local" space. This is also true for pitch and yaw.

My intention is to roll (or pitch/yaw) the car around its 3 axes separetely and have them behave the same regardless of the initial rotation in the world.

Am I thinking this correct?

Thank you

Repository owner locked and limited conversation to collaborators Jan 3, 2024
@jrouwe jrouwe converted this issue into discussion #855 Jan 3, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant