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

Commit

Permalink
hotfix gizmo zeroed position on rigidbody entities (#10943)
Browse files Browse the repository at this point in the history
  • Loading branch information
AidanCaruso authored Aug 13, 2024
1 parent 38535e7 commit 81404ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/editor/src/functions/gizmoHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,9 @@ function pointerDown(gizmoEntity) {
const planeIntersect = intersectObjectWithRay(plane, _raycaster, true)
if (planeIntersect) {
const currenttransform = getComponent(targetEntity, TransformComponent)
currenttransform.matrix.decompose(_positionStart, _quaternionStart, _scaleStart)
_positionStart.copy(currenttransform.position)
_quaternionStart.copy(currenttransform.rotation)
_scaleStart.copy(currenttransform.scale)
gizmoControlComponent.worldPositionStart.set(_positionStart)
gizmoControlComponent.worldQuaternionStart.set(_quaternionStart)

Expand Down

0 comments on commit 81404ef

Please sign in to comment.