Problem in collision detection

I try to detect collision using following obj and failed. I checked this using helloCollsion sample which is provided. Can u clarify ??

Also tried using .j3o. still not succeed.



private Spatial house;

private RigidBodyControl houRi;



house = assetManager.loadModel(“Models/oldHouse.obj”);

house.setLocalScale(0.1f);

house.setLocalTranslation(-70, 0, -70);

CollisionShape sceneShape2 =

CollisionShapeFactory.createMeshShape((Node) house);

houRi = new RigidBodyControl(sceneShape2, 0);

house.addControl(houRi);



rootNode.attachChild(house);

bulletAppState.getPhysicsSpace().add(houRi);

How u detect collision?? Can u clarify??

I used the same mechanism at “https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:beginner:hello_collision#jme_3_tutorial_9_-_hello_collision



I`ve just commented the line



house.setLocalTranslation(-70, 0, -70);



and it began to work properly. Why is that and is there any other way to set the locations of this rigid body on my terrain?

Finally trial and error method was success.



house = assetManager.loadModel(“Models/oldHouse.obj”);

house.setLocalScale(0.1f);



// house.setLocalTranslation(-70, 0, -70);

CollisionShape sceneShape2 =

CollisionShapeFactory.createMeshShape((Node) house);

houRi = new RigidBodyControl(sceneShape2, 0.0f);

house.setLocalTranslation(-70, 0, -70);

house.addControl(houRi);



Just change the place of (sequential order) code of line “house.setLocalTranslation(-70, 0, -70);”.



Thanks a lot normen.