Jump to content

  • Log In with Google      Sign In   
  • Create Account


Rexxaw(Forgrim's mate)

Member Since 04 Feb 2011
Offline Last Active Dec 29 2012 11:20 AM

#4803431 Finding an angle relative to current angle

Posted by Rexxaw(Forgrim's mate) on 27 April 2011 - 12:31 AM

Heres my solution



if (Keyboard.GetState().IsKeyDown(Keys.A))
{


speed = 0.35f;
// degrees = 270.0f;
degrees = MathHelper.ToDegrees(pRot);
degrees -= 90;
pRotStrafe = MathHelper.ToRadians(degrees);


pVlx = (float)Math.Cos(pRotStrafe) * speed;
pVly = (float)Math.Sin(pRotStrafe) * speed;

pPos -= new Vector2(pVlx, pVly);



}

if (Keyboard.GetState().IsKeyDown(Keys.D))
{
speed = 0.35f;
degrees = MathHelper.ToDegrees(pRot);
degrees += 90;
pRotStrafe = MathHelper.ToRadians(degrees);

pVrx = (float)Math.Cos(pRotStrafe) * speed;
pVry = (float)Math.Sin(pRotStrafe) * speed;
pPos -= new Vector2(pVrx, pVry);

}


Strikes me as a lot of computation but it does work.

To alleviate all the questions i badger the boards with i can at least post solutions as i find them. :)


#4769977 Aerodynamic Lift Question

Posted by Rexxaw(Forgrim's mate) on 05 February 2011 - 07:09 AM

Yeah a stall is when the air flow over the wings can no longer 'hold on for the ride' so to speak. Just as the air flow seperates from the body of the wing (because its just at too much of an angle) the aircraft suddenly looses all that lift, and the nose drops. Well-behaved forgiving aircraft you can really feel this coming, as the seperation of the airflow is gradual. The dangerous ones that 'bite you' typically the airflow will seperate suddenly en masse...Laminar wings are prone to this.
Also in the in-between realm of a seperating airflow, you get buffet, wobbling and shuddering.. :) Gl with your game.


PARTNERS