SET Rotation

Hello,

Is there any way to change this value in bge in python?

I have been using own.applyRotation([0,1,0], 0) but then it just keeps rotating.
I want to SET the Rotation.

thx

-Matthew

You probably want to use .alignAxisToVect which will allow you to set the positive x y or z of an object to some vector.

Let me give you an example. I want an object to rotate to 47 degrees and stay there. how do i do that?

rot = someObject.worldOrientation.to_euler()
rot.x+=(47*(degrees to radians))
own.worldOrientation = rot

hint
1 degree = 0.0175 radian

I did what you did but i did rot.x=(blah blah) instead of rot.x+=(blah blah) and it works perfect! thx :slight_smile: