Replies: 1 comment
-
Resolved. Just need to clear the forces. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
Something obvious is skipping my mind with Bullet Physics library, so apology in advance:
I have a dynamic rigidbody, which I'd like to have its Y (up/down) coordinate to be at constantly at a certain value, let's say 50 units in world space, and move freely along the X Z axis.
With the following code, I set the get the body current origin, and just correct the Y coordinate to 50, like this:
this works but the body is wildly shaking, up and down, see videos:
https://youtu.be/SdhgbopYliM
https://youtu.be/Bo4IQvwZ6ms
which is surprising considering the value's constant nature (50.0f). As you can see on the videos, the X Z values are smooth, as they left intact.
The code above is executed in a bullet's pre-tick callback function. I tried the on-tick callback function, but it shakes even more. I also tried to grab the motionstate (default) transformation and set it in rendering frame, but no joy.
I have no other place i manipulate this body. Its mass is 1.0, and the gravity is -9.8, and the body does not collide with anything in the videos.
How could this jittering be eliminated?
(I see in other posts that kinematic objects have no such issues, but my use case is with plain dynamic bodies).
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions