Discussion:
Unable to rotate correctly
cy_1989
2011-01-28 01:25:12 UTC
Permalink
I encountered another problem ,earlier on i post this prob in another thread
but somehow i guess it got deleted off. When i press the left arrow key the
spaceshuttle will turn upside down and it will be pointing to the right. May
i know how to solve this problem.

Below is the coding i used(bold):


public function downShuttle(e:KeyboardEvent):void
{
switch(e.keyCode)
{
case Keyboard.DOWN:
{
shuttle.y -=10;

labelText = shuttle.y.toString();
break;
}

case Keyboard.UP:
{
shuttle.y += 10;
camera.y -=2;
break;
}

case Keyboard.LEFT:
{
shuttle.x -=10;
camera.x -=2;
shuttle.rotationX =90;
break;
}

case Keyboard.RIGHT:
{
shuttle.x +=10;
camera.x +=2;
shuttle.rotationX = -90;
break;
}

}
}
--
View this message in context: http://papervision3d.758870.n4.nabble.com/Unable-to-rotate-correctly-tp3243571p3243571.html
Sent from the Papervision3D mailing list archive at Nabble.com.
Loading...