I’m trying to set and rotate a camera to a specific position / orientation in world space, during the game engine is running. I receive position and orientation data continually via network as a 3x3 rotation matrix and a 3 component tranformation vector.
As I saw in the Blender Python API, it’s possible to get the current camera position and orientation in exactly this format via “myCamera.worldPosition” and “myCamera.worldOrientation”. The problem is, that I couldn’t find functions like “setWorldPosition” and “setWorldOrientation”.
Of course I can use “applyMovement” and “applyRotation” but therefor I have to calculate the difference between the last position an my new position and much harder I have to translate the rotation matrix into an x,y and z rotation value (it’s a part of pi but I dont know how this is called).
But this is getting inaccurate over the time and the effort to translate the rotation isn’t that small.
Does anybody have an idea how to solve this problem, or is there any advanced developer who can tell me how to extend the game engine python API?
By the way, I’m using Blender 2.57
I’m new in this Forum and hope I did everything right with this post…