Hi,
I have a rotation issue.
Whats meant to happen is that when they press left the spaceship thing rotates left too. And when they go right the spaceship should rotate right.
But it justs rolls left regardless of which key I press.
Can someone please explain why this is happening?
Here is my function code (Basic I know
)
function Rolling(Object,Key)
If Key=Right then ZRotate Object Object,Object Angle Z(1)-0.1
If Key=Left then ZRotate Object Object,Object Angle Z(1)+0.1
endfunction
EDIT:I figured it out
Needed to use numbers instead of "left" and "right"
function Rolling(Object,Key)
If Key=1 then Rotate Object Object,Object Angle X(1),Object Angle Y(1),Object Angle Z(1)-0.1
If Key=2 then Rotate Object Object,Object Angle X(1),Object Angle Y(1),Object Angle Z(1)+0.1
endfunction
Vist freefungames.co.cc for free online games you can play at school!
Also join our forums!