How Rotate a node 45 degrees around x axis
Posted: Wed Nov 10, 2010 3:38 pm
Can someone help me with some simple code to rotate a node around the x axis 45 degrees and the stop every time the user presses x.
as opposed to this:
as opposed to this:
Code: Select all
if IsKeyDown(EKEY_CODE.KEY_KEY_X) = true then
KeyIsDown(EKEY_CODE.KEY_KEY_X) = false
x=1
// add rotation animator
dim position as core_vector3df = new core_vector3df(0,0,0)
position = new core_vector3df(x,y,z)
anim = scene.createRotationAnimator(position)
node.addAnimator(anim)
end
Thanks