How to remove gravity from PhysicsNode


First i want to sorry for my English.

I have one problem, i have created my room and added it to PhysicsNode and it all time falling. I just want to stop it and what it will be all time in one position (no gravity).

Can someone help?

Thanks :slight_smile:

Try getPhysicsSpace().setGravity(Vector3f.ZERO);

Edit: Set this before adding the PhysicsNodes! If you want to disable the gravity of single PhysicsNodes, do so after adding the PhysicsNode

if it is the room or environment you want to stop falling, then you can always instantiate it with zero mass. Then the room stands still, but all other physicsNodes will have normal gravity effects.

Set third parameter to 0:

[java]PhysicsNode landscape = new PhysicsNode(sceneModel, sceneShape, 0);[/java]

Zero mass means static, such nodes cannot move.