Blender: Walk around sphere Blender: Walk around sphere python python

Blender: Walk around sphere


The consensus seems to be that you should accomplish such rotations using quaternions.

See this for the api: http://www.blender.org/documentation/249PythonDoc/Mathutils.Quaternion-class.html

See this for an introduction to the maths: http://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions#Quaternions


There is a allign-function. If the game-object is called own it should be something like own.alignAxisToVect(vector, 2, 1) with 2 being the index for the Z-axis(x=0,y=1,z=2) and 1 being the speed of allignment (between 0 and 1)