Feb 4, 2011 at 6:24 PM
Edited Feb 4, 2011 at 6:28 PM
So i'm just learning to use the engine, and i'm starting off with a simple helicopter with a thrust and is affected by gravity.
I've forgone the world gravity and opted to simply apply a force based on a mass value.
my code for applying the thrust is this
//creates thrust value based on thumbstick
player.thrust = -1000 * (padState.ThumbSticks.Left.Y+1);
//local variable to hold value of thrust based on rotation of helicopter
Vector2 force = new Vector2((float)(Math.Cos(DegToRad(player.rotation + 90)) * player.thrust), (float)(Math.Sin(DegToRad(player.rotation + 90)) * player.thrust));
//applies thrust force
//applies gravity force
copter.Body.ApplyForce(new Vector2(0, player.mass*10), copter.Body.Position); //player mass is 100
My problem is that it moves too slow. The forces don't seem to accumulate, theres no acceleration, the helicopter just moves at a seemingly constant speed. And I've tried increasing the forces but that just makes it move at a faster constant speed.
Constant force should create acceleration, so I must be doing something wrong. What should i do?