I’ve parented a Object (in this case a Camera) to another object. With a python script i’m turning the camera around. Does anyone know how I can read the camera position, and then later turn it back on that spot? So that the Camera moves back to the original position.
in the blend i attached you can see a working demonstration.
press the W key to move and the S key to stop.
if you want to rotate the object just switch the o.position to o.localOrientation and it should be working using the rotation
if you use 2.49 you should uncheck the game->ignore deprecation warnings and make them vanish (the console gives you all the informations you need for that)
to use the rotation instead of the position just exchange the o.position in the script with o.localOrientation and make the objects actuator rotate the object instead of moving it.
i looked at your file and you attached the script on the cam. dont know if you intended this, but i recommend you to create three properties in the cam, named x, y and z and press the little button labeled D to debug them. that way you will at least see, how the values change.
Damn. Reloaded newest attachement… I added the script to the camera pivot. as you can see… But when I press W the pivot somehow becomes an Float object so that the rotating script doesn’t work anymore.