File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
GDJS/Runtime/InGameEditor Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -2178,6 +2178,15 @@ namespace gdjs {
21782178 const touchIds = getCurrentTouchIdentifiers ( inputManager ) ;
21792179 const hasMultipleTouches = touchIds . length >= 2 ;
21802180
2181+ // Disable the transform controls when there are multiple touches to prevent
2182+ // accidental gizmo interactions when doing pinch-to-zoom or other multi-touch gestures.
2183+ // This must be done before checking if controls should be hidden, as the TransformControls
2184+ // processes pointer events independently and could start dragging between frames.
2185+ if ( this . _selectionControls ) {
2186+ this . _selectionControls . threeTransformControls . enabled =
2187+ ! hasMultipleTouches ;
2188+ }
2189+
21812190 // Selection controls are shown on the last object that can be manipulated
21822191 // (and if none, selection controls are not shown).
21832192 const lastEditableSelectedObject = this . _selection . getLastSelectedObject ( {
You can’t perform that action at this time.
0 commit comments