@normen said:
"awful" doesn't even come close ^^
I`m sorry... ;;My English skill is so awful. I explain again. ^^;
Here is my source code
[java]
node_Object = new Node("Object");
node_Object = (Node)assetManager.loadModel("Models/boat/boat.j3o");
node_Boat = (Node)node_Object.getChild("boatbody");
node_Sail = (Node)node_Object.getChild("sail");
// CreateCollisionShape
boatShape = new CompoundCollisionShape();
BoxCollisionShape box = new BoxCollisionShape(new Vector3f(0.9f,0.5f,2.7f));
boatShape .addChildShape(box, new Vector3f(0, 0, 0));
BoxCollisionShape sailShape = new BoxCollisionShape(new Vector3f(0.075f,2f,1.375f));
boatShape .addChildShape(sailShape,new Vector3f(0,2.0f,0.3f));
// Create Another CollisionShape
subBoatControl = new RigidBodyControl(0.0f);
node_Boat .addControl(subBoatControl );
// Create Vehiclecontrol
player = new MyVehiclecontrol(boatShape , mass, bulletAppState.getPhysicsSpace());
node_Object .addControl(player);
rootNode.attachChild(node_Object );
bulletAppState.getPhysicsSpace().add(subBoatControl );
bulletAppState.getPhysicsSpace().add(player);
public void simpleUpdate(float tpf) {
.......
j++;
Quaternion qua = new Quaternion(0, 0, 0.5f * j, 0);
yachtcontrol.setPhysicsRotation(qua);
}
[/java]
Here is hierarchy structure.
http://i.imgur.com/EmnEo.png
I want that 'node_Sail' and 'node_Boat ' rotate, when 'node_Object'(Vehicle control) run in PhysicsWorld.
But this source code doesn`t work. Any change is not occured...