Closed ColinGilbert closed 2 years ago
Good idea ! I will try to add this in the next release.
I am trying to set a body to a fixed rotation as well, something like body:setFixedRotation(bool) in box2d. Is it possible to do something similar in current reactphysics3d?
In my case when a cube shape collides with a sphere shape the cube rotates backward a little bit. I tried setting the mass to something huge, but the tilting still occurs.
Thank you.
Oops it's been requested many times, sorry for this one!
I hope this feature will be implemented one day :)
It's already implemented in the 'develop' branch. I will release the next version of the library in the next weeks with this feature.
I glad to announce that this feature is now implemented in version v0.9.0 that has just been released.
There is now a RigidBody::setLinearLockAxisFactor()
method to lock the translational movement of a body along the world-space x, y and z axes and a RigidBody::setAngularLockAxisFactor()
method to lock the rotational movement of a body around the world-space x, y and z axes.
Do not hesitate to take a look at the documentation for more information.
Hi,
I am working on a dynamic character controller, and it would be great to be able to lock linear/rotational movement along certain axes for a given object. Something along the line of
Would be really, really handy.
Thanks!