Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Commit 81404ef

Browse files
authored
hotfix gizmo zeroed position on rigidbody entities (#10943)
1 parent 38535e7 commit 81404ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/editor/src/functions/gizmoHelper.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,9 @@ function pointerDown(gizmoEntity) {
533533
const planeIntersect = intersectObjectWithRay(plane, _raycaster, true)
534534
if (planeIntersect) {
535535
const currenttransform = getComponent(targetEntity, TransformComponent)
536-
currenttransform.matrix.decompose(_positionStart, _quaternionStart, _scaleStart)
536+
_positionStart.copy(currenttransform.position)
537+
_quaternionStart.copy(currenttransform.rotation)
538+
_scaleStart.copy(currenttransform.scale)
537539
gizmoControlComponent.worldPositionStart.set(_positionStart)
538540
gizmoControlComponent.worldQuaternionStart.set(_quaternionStart)
539541

0 commit comments

Comments
 (0)