Source:
public MockupSceneEditor(Controller controller) { super(controller); setFillParent(true); scissorBounds = new Rectangle(); groupEditor.addListener(new ActorGestureListener() { private float rotation, scaleX, scaleY; private boolean rotationStarted, scaleStarted; private Handles handles = groupEditor.getGroupEditorDragListener() .getModifier().getHandles(); @Override public void zoom(InputEvent event, float initialDistance, float distance) { Actor influencedActor = handles.getInfluencedActor(); if (influencedActor == null) { return; } else if (!scaleStarted) { scaleStarted = true; scaleX = influencedActor.getScaleX(); scaleY = influencedActor.getScaleY(); } float ratio = distance / initialDistance; influencedActor.setScaleX(ratio * scaleX); influencedActor.setScaleY(ratio * scaleY); } @Override public void pinch(InputEvent event, Vector2 initialPointer1, Vector2 initialPointer2, Vector2 pointer1, Vector2 pointer2) { Actor influencedActor = handles.getInfluencedActor(); if (influencedActor == null) { return; } else if (!rotationStarted) { rotationStarted = true; rotation = influencedActor.getRotation(); } Vector2 a = initialPointer2.sub(initialPointer1); Vector2 b = pointer2.sub(pointer1); float deltaRot = MathUtils.atan2(b.y, b.x) - MathUtils.atan2(a.y, a.x); float deltaRotDeg = (deltaRot * MathUtils.radiansToDegrees + 360); influencedActor.setRotation((deltaRotDeg + rotation) % 360); } @Override public void touchUp(InputEvent event, float x, float y, int pointer, int button) { rotationStarted = scaleStarted = false; } }); }

Target:
public MockupSceneEditor(Controller controller) { super(controller); setFillParent(true); scissorBounds = new Rectangle(); groupEditor.addListener(new ActorGestureListener() { private float rotation, scaleX, scaleY; private boolean rotationStarted, scaleStarted; private Handles handles = groupEditor.getGroupEditorDragListener() .getModifier().getHandles(); @Override public void zoom(InputEvent event, float initialDistance, float distance) { Actor influencedActor = handles.getInfluencedActor(); if (influencedActor == null) { return; } else if (!scaleStarted) { scaleStarted = true; scaleX = influencedActor.getScaleX(); scaleY = influencedActor.getScaleY(); } float ratio = distance / initialDistance; influencedActor.setScaleX(ratio * scaleX); influencedActor.setScaleY(ratio * scaleY); } @Override public void pinch(InputEvent event, Vector2 initialPointer1, Vector2 initialPointer2, Vector2 pointer1, Vector2 pointer2) { Actor influencedActor = handles.getInfluencedActor(); if (influencedActor == null) { return; } else if (!rotationStarted) { rotationStarted = true; rotation = influencedActor.getRotation(); } Vector2 a = initialPointer2.sub(initialPointer1); Vector2 b = pointer2.sub(pointer1); float deltaRot = MathUtils.atan2(b.y, b.x) - MathUtils.atan2(a.y, a.x); float deltaRotDeg = (deltaRot * MathUtils.radiansToDegrees + 360); influencedActor.setRotation((deltaRotDeg + rotation) % 360); } @Override public void touchUp(InputEvent event, float x, float y, int pointer, int button) { if (rotationStarted || scaleStarted) { rotationStarted = scaleStarted = false; Actor influencedActor = handles.getInfluencedActor(); if (influencedActor == null) { return; } groupEditor.getGroupEditorDragListener().fireTransformed( influencedActor); } } }); }