I chose ConvexHullShape and passed in the vertices of the model, however I am not sure I have done this part properly.
Code: Select all
ConvexShape staticScenario = new ConvexHullShape(ModelPhysics.getVertices3f(node));
Transform startTransform = new Transform();
startTransform.setIdentity();
float mass = 0f;
startTransform.origin.set(new Vector3f(0, 0, 0));
RigidBodyConstructionInfo info = new RigidBodyConstructionInfo(mass, new DefaultMotionState(
startTransform), staticScenario, new Vector3f(0, 0, 0));
wheel = new RigidBody(info);
wheel.setCollisionFlags(wheel.getCollisionFlags() | CollisionFlags.STATIC_OBJECT);
dynamicsWorld.addRigidBody(wheel);
When I drop a ball into the model, it stops around 25 units on top of the floor and then proceeds to role/hover to the edge of the model and fall off. Why is the ball not touching the model surfaces?
Any help would be appreciated.
Thanks,
Dave