Hey monkeys,
first of all:
If you don’t think I should use a GImpactCollisionShape, you can look at this thread.
Now to the actual problem.
I have a model and want to create a GImpactCollisionShape out of its mesh.
But when I do that, the GImpactCollisionShape is scaled way bigger than the original model.
In order to clarify I made a little non-working example:
[java]
// load model
Node model = (Node) assetManager.loadModel(“Models/airship_tiger_physics.j3o”);
// get model mesh
Mesh mesh = ((Geometry) ((Node) model.getChild(“physics”)).getChild(“mesh1”)).getMesh();
// create GImpactCollisoinShape
GImpactCollisionShape collShape = new GImpactCollisionShape(mesh);
// create RigidBodyControl
RigidBodyControl control = new RigidBodyControl(collShape, 0);
// link model and control to each orther, physicsSpace and rootNode
model.addControl(control);
bas.getPhysicsSpace().add(control);
rootNode.attachChild(model);
[java]
I use the same model to display in the world and to generate the GImpactCollisionShape and I don’t do any scaling.
When I look at the physics debug shape and test it with other rigidbodies I discover that they are not the same size at all.
Any suggestions on why it is like that and how to fix it?
Thanks in advance!