Vibrating up and down, while standing on CompoundCollisionShape

When I(PhysicsCharacterNode) stand on a CompoundCollisionShape(BoxCompoundShape)



[java] Spatial platformGeo = assetManager.loadModel(“Scenes/maya/platform.j3o”);

CompoundCollisionShape platfromCollisionShape =

CollisionShapeFactory.createBoxCompoundShape((Node) platformGeo);




platformPhysicsNodeA = new PhysicsNode(platfromCollisionShape, 1.5f);

platformPhysicsNodeA.attachChild(platformGeo);

platformPhysicsNodeA.setKinematic(true);

platformPhysicsNodeA.setLocalTranslation(new Vector3f(0f, 10f,0f));

platformPhysicsNodeA.setShadowMode(ShadowMode.CastAndReceive);



bulletAppState.getPhysicsSpace().add(platformPhysicsNodeA);

rootNode.attachChild(platformPhysicsNodeA);[/java]



, while, that platform is being moved by



[java] platformPhysicsNodeA.move(new Vector3f(0.5f*tpf, 0,0));[/java]



my character starts shaking, up and down.



Why is this happening?

I dont know what this .move() method does and how it moves the platform. If its not using joints or forces but setLocalTranslation() or similar then its prone to have physics errors.

if I use createMeshCompoundShape instead of createBoxCompoundShape the shaking problem dissaperas, but lots of problem arises. :frowning:



How do I make a dynamic physics object float by applying force.I assume, for a box, I have to apply the same force on four ends.But, how I am gonna do that? and isn’t there a better way?



What is the weight of a PhysicsCharacterNode?When I stand of a upward moving platform, due to additional weight of PhysicsCharacterNode, it starts going down.But, how do I configure the wight of the PlayerCharacterNode? or was the downward motion was due to gravity?Cause, i have seen no weight parameter of physicsCharacterNode :?

I think the PhysicsCharacterNode should not influence other physics objects. It has got no mass and it not a “real” physics object, rather a simple physics simulation with its own gravity parameter.

But when I use the following setting,



[java] Spatial platformGeo = assetManager.loadModel(“Scenes/maya/platform.j3o”);

CompoundCollisionShape platfromCollisionShape =

CollisionShapeFactory.createMeshCompoundShape((Node) platformGeo);



platformPhysicsNodeA = new PhysicsNode(platfromCollisionShape, 1f);

platformPhysicsNodeA.attachChild(platformGeo);

//platformPhysicsNodeA.setKinematic(true);

platformPhysicsNodeA.setLocalTranslation(new Vector3f(0f, 10f,0f));

platformPhysicsNodeA.setShadowMode(ShadowMode.CastAndReceive);



bulletAppState.getPhysicsSpace().add(platformPhysicsNodeA);

rootNode.attachChild(platformPhysicsNodeA);[/java]



with,



[java]platformPhysicsNodeA.applyForce(new Vector3f(0,10f,0), Vector3f.UNIT_Y);[/java]



The platform starts tilting, where I am standing.Is the PlayerCharacteNode has no mass, then it should be only for gravity.But, when gravity starts working?



Does, PlayerCharacterNode, Internally detect the object that it is standing on.



Its’ so confusing.PlayerCharacterNode should be a physics Object, with some removed property.

The character node is just an obstacle for the other physics objects, more like a kinematic node.

  1. But how the platform is tilting?If it(Player) is just an obstacle.


  2. Is there any way to show the Force(or any other) Vectors, Axis Vectors(Local and Global) of an object.Is there any debug rendering mode?
  1. If you apply the force to the middle of the platform and the character is standing on the left side of the platform it will tilt down to the left side, simple logic.
  2. no