Hi, I have a node containing an imported 3DS model and a simple Box shape attached to the same Node.
When I translate both the model and box with the same coordinates only the box moves
Here is the code for initiating the shapes
location = new Vector3f(0, 0, -15);
setLocalTranslation(location);
// test model
model = DataHandler.loadModel("plane.3ds");
model.setLocalScale(0.25f);
model.setModelBound(new BoundingBox());
model.updateModelBound();
// test box
box = new Box("Box", new Vector3f(0,0,0), 1, 1, 1);
box.setModelBound(new BoundingBox());
box.updateModelBound();
attachChild(model);
attachChild(box);
And here is the code for updating its position:
public void update(float time) {
location = getLocalTranslation();
location.x += (velocity.x * time);
location.y += (velocity.y * time);
setLocalTranslation(location);
model.setLocalTranslation(location);
box.setLocalTranslation(location);
}
Im probably missing something really simple but I just cant get the model to move!