Jump to content
  • Advertisement
Sign in to follow this  
BerserkIvix

Physics library for both 2 and 3 D

This topic is 726 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

Hello everyone.

I'm using C#, what's a good physics library for both 2D and 3D simulations?

 

Thanks in advance for any help.

 

Bye, Ivano.

 

Share this post


Link to post
Share on other sites
Advertisement

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!