开发者

Can I make a Body immune to Gravity?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜