Sign in to follow this  

Physics library for both 2 and 3 D

This topic is 417 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

You can use Bullet for both 2D and 3D. The computations are always done in 3D space, but you can constrain movement of the objects to one plane (e.g. the XY plane) to emulate 2D physics. This is set on a btRigidBody by calling the get/setAngularFactor() and get/setLinearFactor() methods. The default is that all axes have motion (linear/angular factors = (1,1,1)). To do 2D physics in the XY plane, you would want linearFactor=(1,1,0) and angular factor = (0,0,1), indicating you only want translation along the XY directions, and rotations about the Z axis only.

Share this post


Link to post
Share on other sites

This topic is 417 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this