Jump to content

Rotating attached element


abadabadu

Recommended Posts

When I attach object to vehcile:

local veh = getPedOccupiedVehicle ( localPlayer ) 
             
local x, y, z = getElementPosition ( veh ) 
             
local attached = createObject ( 2455, x,y, 30,0,0,0 ) 
             
attachElements ( attached, veh, 0, 3, 0 ) 

And then I try to rotate attached element with setElementRotation ()

  
local x2, y2, z2 = getElementRotation ( attached ) 
setElementRotation ( attached, x2 + 1, y2 + 1, z2 + 1 )  

"attached" element does NOT rotate. ( Even getElementRotation(attached) called in the same frame returns result like it was rotated ).

Is there any way to rotate atteched element without breaking the attachment?

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