#57487 - chrissieboy - Sun Oct 16, 2005 12:56 pm
Hi guys, im busy for 1,5 day to make my vehicle drive in the good direction.
So the up button is accelerate, left and right rotate the vehicle. And if they push left or right the vehicle is rotated and with up the vehicle must accelerate the direction is chosen.
How can i accelerate the vehicle in the good x and z direction?
now my vehicle only moves in the x direction. But i need a math based solution with sin and cos or something.
e.g :
z |............45 degrees
6 |.........../
5 |........./
4 |......./
3 |...../
2 |.../
1 |./
----------------
12345 6 x
vehicle is turned into 45 degrees, now the x and z moves egual.
If vehicle is turned 20 degrees then z moves faster then x .
lets say z = 6 and x is 3
Maybe somebody already had this problem too and know a solution?
So the up button is accelerate, left and right rotate the vehicle. And if they push left or right the vehicle is rotated and with up the vehicle must accelerate the direction is chosen.
How can i accelerate the vehicle in the good x and z direction?
now my vehicle only moves in the x direction. But i need a math based solution with sin and cos or something.
e.g :
z |............45 degrees
6 |.........../
5 |........./
4 |......./
3 |...../
2 |.../
1 |./
----------------
12345 6 x
vehicle is turned into 45 degrees, now the x and z moves egual.
If vehicle is turned 20 degrees then z moves faster then x .
lets say z = 6 and x is 3
Maybe somebody already had this problem too and know a solution?