File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -404,6 +404,9 @@ function attachElement(element)
404404 posX , posY , posZ = getElementPosition (element )
405405 movementType = MOVEMENT_MOVE
406406
407+ -- Clear the quat rotation when attaching to element
408+ exports .editor_main :clearElementQuat (selectedElement )
409+
407410 if (getElementType (element ) == " vehicle" ) or (getElementType (element ) == " object" ) then
408411 rotX , rotY , rotZ = getElementRotation (element , " ZYX" )
409412 elseif (getElementType (element ) == " player" ) or (getElementType (element ) == " ped" ) then
@@ -420,6 +423,9 @@ function detachElement()
420423 if (selectedElement ) then
421424 disable ()
422425
426+ -- Clear the quat rotation when detaching from element
427+ exports .editor_main :clearElementQuat (selectedElement )
428+
423429 -- fix for local elements
424430 if not isElementLocal (selectedElement ) then
425431 -- sync position/rotation
You can’t perform that action at this time.
0 commit comments