Making model go where it's facing

Started by
10 comments, last by supervlad 14 years, 8 months ago
Do what I told you to do.
That's the simplest motion one can imagine, I have no idea what's wrong.
position.x -= sin(self_angle)*self_speed * delta_time;position.y += cos(self_angle)*self_speed * delta_time;//play around with the signs, maybe ... += sin(...)...//Rendering, whatever syntax in scripting:ViewTransformations();  //Camera move rotate...DrawWorld();            //static objects, terrain, trees whateverglPushMatrix();glTranslatef(position.x,position.y,position.z);//since Z isn't altered, I suppose you initialized it.glRotatef(self_angle,0,0,1); //self_angle in degrees!!!DrawHelicopter();glPopMatrix();Other_Object_Transformation();Draw_Other_Objects();...

My helicopter model has to be oriented the same way:
X is pointing forward, Z is upwards.
Advertisement
Thanks for the info, everyone.

This topic is closed to new replies.

Advertisement