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)
404
404
posX , posY , posZ = getElementPosition (element )
405
405
movementType = MOVEMENT_MOVE
406
406
407
+ -- Clear the quat rotation when attaching to element
408
+ exports .editor_main :clearElementQuat (selectedElement )
409
+
407
410
if (getElementType (element ) == " vehicle" ) or (getElementType (element ) == " object" ) then
408
411
rotX , rotY , rotZ = getElementRotation (element , " ZYX" )
409
412
elseif (getElementType (element ) == " player" ) or (getElementType (element ) == " ped" ) then
@@ -420,6 +423,9 @@ function detachElement()
420
423
if (selectedElement ) then
421
424
disable ()
422
425
426
+ -- Clear the quat rotation when detaching from element
427
+ exports .editor_main :clearElementQuat (selectedElement )
428
+
423
429
-- fix for local elements
424
430
if not isElementLocal (selectedElement ) then
425
431
-- sync position/rotation
You can’t perform that action at this time.
0 commit comments