Page 1 of 1

GE 1.5 Beta Rotation?

PostPosted: Sat Jun 30, 2012 8:27 pm
by Hblade
I'm designing a space-shooter, and I was wondering how I can set rotation? Like, when you press down, I want the ship to turn down-ward at an angle, same with up. How can I set the rotation based on an angle? Example:
Code: Select all
if(angle<45)
{
angle+=(45/10); //10 frames to complete angle change
Rotate?
}

Re: GE 1.5 Beta Rotation?

PostPosted: Sat Jun 30, 2012 8:43 pm
by skydereign
The function to rotate is the SetRotation function.
Code: Select all
SetRotation(angle);

Re: GE 1.5 Beta Rotation?

PostPosted: Sat Jun 30, 2012 9:04 pm
by Hblade
Ahh thanks.
Problem though, Dynamic actors can't rotate with gravity set to 0 for some reason.

Edit:
Actually after testing once, this script stops working after the first time and stops mid-way through the rotation
Code: Select all
angle+=5;
SetRotation(angle);


This is easilly solved by replacing angle with a variable