Skip to content

Pinching gesture

Move the camera or objects with pinching gestures.

Authors and contributors to this community extension: D8H.


This extension allows to:

  • Move, rotate and/or zoom the camera according to pinch gestures
  • Move, rotate and optionally scale objects according to pinch gestures
  • Handle more specific needs with various expressions

Limitations:

  • Only one pinching gesture is detected at a time

Tip

Learn how to install new extensions by following a step-by-step guide.

Actions

Enable or disable camera pinch
Enable or disable camera pinch.

Camera pinch constraints
Change the camera pinch constraint.

Camera pinch layer
Choose the layer to move with pinch gestures.

Conditions

Camera pinch is enabled
Check if camera pinch is enabled.

Touch is pinching
Check if a touch is pinching, if 2 touches are pressed.

Expressions

Expression Description
PinchGesture::BeginningCenterX() Return the X position of the pinch center at the beginning of the gesture.
PinchGesture::BeginningCenterY() Return the Y position of the pinch center at the beginning of the gesture.
PinchGesture::CurrentCenterX() Return the X position of the pinch center.
PinchGesture::CurrentCenterY() Return the Y position of the pinch center.
PinchGesture::InversedX() Return the original X position of a point before the pinch gesture.
PinchGesture::InversedY() Return the new position on the Y axis of a point after the pinch gesture.
PinchGesture::Rotation() Return the rotation of the pinch gesture from its beginning (in degrees).
PinchGesture::Scaling() Return the scaling of the pinch gesture from its beginning.
PinchGesture::TransformedX() Return the new X position of a point after the pinch gesture.
PinchGesture::TransformedY() Return the new Y position of a point after the pinch gesture.
PinchGesture::TranslationX() Return the horizontal translation of the pinch gesture from its beginning.
PinchGesture::TranslationY() Return the vertical translation of the pinch gesture from its beginning.

Pinchable object

Move objects by holding 2 touches on them.

Behavior actions

Abort pinching
Abort the pinching of this object.

Behavior conditions

Is being pinched
Check if the object is being pinched.

No expressions for this behavior.


This page is an auto-generated reference page about the Pinching gesture extension, made by the community of GDevelop, the open-source, cross-platform game engine designed for everyone. Learn more about all GDevelop community-made extensions here.