Jump to content

[HELP] Attaching objects possition problem


..:D&G:..

Recommended Posts

Hi guys, I am trying to attach a gate to CJ garage but when I use attachElements, the gate gets in the middle of the garage, and turned 90 degrees

local garage = createObject(17950, tonumber(x), tonumber(y), tonumber(z), tonumber(rot1), tonumber(rot2), tonumber(rot3)) 
        local gate = createObject(17951, tonumber(x)+4.22, tonumber(y)+1.05, tonumber(z)-0.25, tonumber(rot1), tonumber(rot2), tonumber(rot3)-90) 
        attachElements ( gate, garage ) 

Any ideas?

Link to comment
local garage = createObject(17950, tonumber(x), tonumber(y), tonumber(z), tonumber(rot1), tonumber(rot2), tonumber(rot3)) 
local gate = createObject(17951, tonumber(x)+4.22, tonumber(y)+1.05, tonumber(z)-0.25, tonumber(rot1), tonumber(rot2), tonumber(rot3)) 
attachElements(gate, garage) 

Link to comment

Have a look to attachElements arguments

        local garage = createObject(17950, tonumber(x), tonumber(y), tonumber(z), tonumber(rot1), tonumber(rot2), tonumber(rot3)) 
        local gate = createObject(17951, tonumber(x)+4.22, tonumber(y)+1.05, tonumber(z)-0.25, tonumber(rot1), tonumber(rot2), tonumber(rot3)-90) 
        attachElements ( gate, garage, 4.22, 1.05,-0.25, 0, 0, -90) 

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