01.09.2010, 12:06
Quote:
To do this, you will have to use the new function GetVehicleRotationQuat. However, it works with quaternions, which is not an easy concept to understand. JernejL made some functions to project a vector depending on where the vehicle is facing, so you can then multiply it and use it as speed.
http://pastebin.com/7L2yi3gz The front side of the car is the negative Y coord, so you can use a code similar to this: pawn Код:
This function is very powerful, you will be able to add side speeds (regardless if the car is going up a cliff or not), or even detect if the player's vehicle is flipped, among others. |