setLocalRotation / rotate to move a rotate a MeshCompoundShape or BoxCompoundShape

whenever i try to use setLocalRotation / rotate to move a rotate a MeshCompoundShape or BoxCompoundShape, the physicsCharacterNode falls through at one point. What can I do to avoid this?



I cant use force, cause, its(rotating platfom’s) mass is zero. I dont wannt go into the extra of, maintaining its balance. I just wanna rotate the physics node while the character can stand on it.

You simply should not move physics objects like that, its like you’re beaming objects in the real world. Use the physics methods (setWalkingDirection for character, applyForce et al for rigidbodys etc.) to move physics objects or make sure you dont place them inside each other. When you set PhysicsRigidBodys to kinematic mode, you can move them with setLocalTranslation() and the physics will be able to compute the forces correctly, however the object is not affected by physics itself.

I wanna move a platform to a custom location and then rotate it on its own axis.



What i did is,

I imported it, relocated it, then set a mass of 2000, setKinematic to true and then used rotate method to rotate the physicsNode.



now the character dont fall through.



moving and using force to balance it while a character will be walking on it and using angular force to rotate it…all at the same time…is it an easy way to do.

  • what does setAngularDamping and setLinearDamping do?


  • is it possible to constrain the movement of a physics node on a certain axis?
  1. sets a damping value for rotational and linear movement, as the method names indicate
  2. no, this function of the native bullet is not implemented correctly in jbullet, it will be available when I move the physics to native bullet