Hi,
I try to have the main caractercontrol stuck on a platform once it get inside the vehicle or on an elevator platform
i create a joint between the player’s rigid body and the platform body
I used box bodies so far, but i only want collision on one side, not all 6 faces of the box,
so i used simplexCollisionShape and a modified version of Quad (only invertex y and z for the vertices)
but it does not display a debug shape and does not preform collision
Code:
MyQuad plane = new MyQuad();
plane.updateGeometry(dims.x, dims.z,false);
Geometry geo= new Geometry(name,plane);
geo.setMaterial(mat);
geo.setLocalTranslation(pos);
SimplexCollisionShape shape = new SimplexCollisionShape(
new Vector3f(-dims.x,0, dims.z),
new Vector3f( dims.x,0, dims.z),
new Vector3f( dims.x,0,-dims.z),
new Vector3f(-dims.x,0,-dims.z));
RigidBodyControl body = new RigidBodyControl(shape,1.5f);
geo.addControl(body);
body.setKinematic(true);
rootNode.attachChild(geo);
bulletAppState.getPhysicsSpace().add(geo);</div>
anything wrong with my code or the api ?
i saw on another post that bullet did not possibly provide a debug shape, but it should still do collisions :(