getting the rotation in x axis during runtime

hello guys I was creating a game and it’s almost done but i got a problem…

I want to limit the camera rotation in x axis (I am using a mouselook script i found in the internet but I don’t remember the name of the author.)

so is there any possible instances that i could get the angle of rotation or just the angle in x axis of the game object during runtime?

I tried rotation_euler method but it just gave me the angle of rotation before the game starts and it doesn’t update…

what i want to get is. when the camera starts at 0 degree the system console will print the o degree angle. If I push the mouse forward (the camera will rotate upward) and i want the system console to print the current angle of the camera base on how many angle did the camera rotated. I’m using blender 2.63 version though (if it matters)

In your controller you can get the current Euler angles with:


These angles are stored as radians.

Then you can do

obj[‘propertyName’] = <value>and set a property that is X to pass to other objects :slight_smile:

it actually worked… thanks

I’ll try that. thanks.:slight_smile: