Hi. could you help me? I've got a question I
You need to change a dynamic node into a static node during run-time, or what? I suggest something like this (see if it doesn't throw a classCast):
mydynamicnode = (PhysicsNode)mydynamicnode
mydynamicnode = (StaticPhysicsNode)mydynamicnode
A static node doesn't move or rotate on collision with other objects, while it still let them react physically. A dynamic node can be rotated, that's called torque. ie:
mydynamicnode.addTorque(new Vector3f(0,2,0))
actualy i would need something like that too.
I've got a Planet represented by a DynamicNode which is rotating of course, but if something crashes into the Planet i dont want it to move.
But since you cannot add torque to a StaticPhysicsNode, i think the only way is to repeatly set the LocalTranslation to its original Position.
Or are there other ways to achive such behavior?
Set the mass very high?
i just tried again with Float.MAX_VALUE for mass and torque, that seems to do the trick.
i remember i tried with a very high mass before, but it wasn't enough i guess.