I have one actor which can be rotated. Now I am trying to copy the Y-rotation for the actor to the empty I have. What is the best way doing this in BGE ?
I have tested making constraints in animation side, which makes the Y-axis to be copied from the actor object to the empty. This works fine in 3D view and in animation side but in BGE it doesn’t.
I have tested the python to do something like this. Any suggestions to the “No idea what to put here” string ?
import GameLogic as g
empty = g.getCurrentcontroller().getOwner()
ship = g.getCurrentScene().getObjectList()["OBShip"]
eori = empty.getOrientation()
sori = ship.getOrientation()
eori.setOrientation( No idea what to put here )
I thought that I found the answer but I forgot that I only want to copy the Y-Rotation. So still trying to make the correct setOrientation parameter here.
eori.setOrientation(sori)
But if there is some logic brick / better way to do this, I would be really interested in hearing it