bandi94 Posted July 12, 2011 Share Posted July 12, 2011 i have 2 rockets on a car and i wanna to shoot the rockets near the car door but if i set x+2 then it shoots near door but if i turn my car then no more shoot near door bk need to incarse the y to and decreas x ( i think i need to get the x,y,z whit car rotation....) but i don't find how? can somebody help me ? Link to comment
Wojak Posted July 12, 2011 Share Posted July 12, 2011 local matrix = getElementMatrix(Vehicle) local x1 = 2 * matrix[1][1] + 0 * matrix[2][1] + 0 * matrix[3][1] + 1 * matrix[4][1] local y1 = 2 * matrix[1][2] + 0 * matrix[2][2] + 0 * matrix[3][2] + 1 * matrix[4][2] local z1 = 2 * matrix[1][3] + 0 * matrix[2][3] + 0 * matrix[3][3] + 1 * matrix[4][3] local x2 = -2 * matrix[1][1] + 0 * matrix[2][1] + 0 * matrix[3][1] + 1 * matrix[4][1] local y2 = -2 * matrix[1][2] + 0 * matrix[2][2] + 0 * matrix[3][2] + 1 * matrix[4][2] local z2 = -2 * matrix[1][3] + 0 * matrix[2][3] + 0 * matrix[3][3] + 1 * matrix[4][3] Link to comment
bandi94 Posted July 12, 2011 Author Share Posted July 12, 2011 hmm. thx man i fixed it Link to comment
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