DjSt3rios Posted January 26, 2013 Posted January 26, 2013 Hello. I need some help. I would like to calculate the position in front of the player's vehicle. I tried a few things but nothing seems to work. Do you have any idea how to do that?
guix Posted January 28, 2013 Posted January 28, 2013 Hello! (Looks like courteous people are a rare thing on this forum) A much easier and more efficient way of doing this is with the element matrix: local fMatrix = getElementMatrix( iVehicle ) -- Calculate a position that is 10 units (meters) in front of the vehicle's position. local X = fMatrix[4][1] + ( fMatrix[2][1] * 10 ) local Y = fMatrix[4][2] + ( fMatrix[2][2] * 10 ) local Z = fMatrix[4][3] + ( fMatrix[2][3] * 10 )
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now