Jump to content

need some help whit rockets


bandi94

Recommended Posts

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
        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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...