开发者

Can I make a Body immune to Gravity?

开发者 https://www.devze.com 2023-04-01 09:56 出处:网络
I want a PhysicsWorld where only some elements are af开发者_如何学编程fected by gravity (as set by the Accelerometer). I\'ve tried setting the mass of some objects to 0, but this doesn\'t work. Is the

I want a PhysicsWorld where only some elements are af开发者_如何学编程fected by gravity (as set by the Accelerometer). I've tried setting the mass of some objects to 0, but this doesn't work. Is there any way of making some Bodys immune to the gravity of the world they're in?


Think about how you'd do it in the real world - you need an upwards force to counteract gravity to make something neutrally buoyant.

So try applying an acceleration to the body which is equal and opposite to your gravitational acceleration.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号