I have two objects base and weapon and I need to set rotate point of weapon to position of base.
public Test(){
position1 = new Vector3(0,0,0);
baseModel = modelLoader.loadModel(Gdx.files.getFileHandle("data/models/tower/bases/base1.g3db", FileType.Internal));
base = new Base(baseModel, position1);
position2 = new Vector3(3,10,5);
weaponModel = modelLoader.loadModel(Gdx.files.getFileHandle("data/models/tower/weapons/weapon2.g3db", FileType.Internal));
weapon = new Weapon(weaponModel, position2);
}
Here is update method
public void update(float delta){
weapon.transform.rotate(0, 1, 0, 45*(delta/2));
base.transform.rotate(0, 1, 0, 45*(delta/2));
}
Thank you for answer