unreal.MagicLeapTouchpadGesture

class unreal.MagicLeapTouchpadGesture(motion_source='None', type=MagicLeapTouchpadGestureType.NONE, direction=MagicLeapTouchpadGestureDirection.NONE, position_and_force=[0.0, 0.0, 0.0], speed=0.0, distance=0.0, finger_gap=0.0, radius=0.0, angle=0.0)

Bases: unreal.StructBase

Information about a recognized touchpad gesture.

C++ Source:

  • Plugin: MagicLeap
  • Module: MagicLeapController
  • File: TouchpadGesturesComponent.h

Editor Properties: (see get_editor_property/set_editor_property)

  • angle (float): [Read-Write] Angle from the center of the touchpad to the finger.
  • direction (MagicLeapTouchpadGestureDirection): [Read-Write] Direction of gesture
  • distance (float): [Read-Write] For radial gestures, this is the absolute value of the angle. For scroll and pinch gestures, this is the absolute distance traveled in touchpad distance. The touchpad is defined as having extents of [-1.0,1.0] so this distance has a range of [0.0,2.0].
  • finger_gap (float): [Read-Write] Distance between the two fingers performing the gestures in touchpad distance. The touchpad is defined as having extents of [-1.0,1.0] so this distance has a range of [0.0,2.0].
  • hand (ControllerHand): [Read-Write] Hand on which the gesture was performed. deprecated: Hand is deprecated. Please use MotionSource instead.
  • motion_source (Name): [Read-Write] Motion source on which the gesture was performed.
  • position_and_force (Vector): [Read-Write] Gesture position (x,y) and force (z). Position is in the [-1.0,1.0] range and force is in the [0.0,1.0] range.
  • radius (float): [Read-Write] For radial gestures, this is the radius of the gesture. The touchpad is defined as having extents of [-1.0,1.0] so this radius has a range of [0.0,2.0].
  • speed (float): [Read-Write] Speed of gesture. Note that this takes on different meanings depending on the gesture type being performed: - For radial gestures, this will be the angular speed around the axis. - For pinch gestures, this will be the speed at which the distance between fingers is changing. The touchpad is defined as having extents of [-1.0,1.0] so touchpad distance has a range of [0.0,2.0]; this value will be in touchpad distance per second.
  • type (MagicLeapTouchpadGestureType): [Read-Write] Type of gesture.
angle

(float) – [Read-Only] Angle from the center of the touchpad to the finger.

direction

(MagicLeapTouchpadGestureDirection) – [Read-Only] Direction of gesture

distance

(float) – [Read-Only] For radial gestures, this is the absolute value of the angle. For scroll and pinch gestures, this is the absolute distance traveled in touchpad distance. The touchpad is defined as having extents of [-1.0,1.0] so this distance has a range of [0.0,2.0].

finger_gap

(float) – [Read-Only] Distance between the two fingers performing the gestures in touchpad distance. The touchpad is defined as having extents of [-1.0,1.0] so this distance has a range of [0.0,2.0].

hand

(ControllerHand) – [Read-Only] Hand on which the gesture was performed. deprecated: Hand is deprecated. Please use MotionSource instead.

motion_source

(Name) – [Read-Only] Motion source on which the gesture was performed.

position_and_force

(Vector) – [Read-Only] Gesture position (x,y) and force (z). Position is in the [-1.0,1.0] range and force is in the [0.0,1.0] range.

radius

(float) – [Read-Only] For radial gestures, this is the radius of the gesture. The touchpad is defined as having extents of [-1.0,1.0] so this radius has a range of [0.0,2.0].

speed

(float) – [Read-Only] Speed of gesture. Note that this takes on different meanings depending on the gesture type being performed: - For radial gestures, this will be the angular speed around the axis. - For pinch gestures, this will be the speed at which the distance between fingers is changing. The touchpad is defined as having extents of [-1.0,1.0] so touchpad distance has a range of [0.0,2.0]; this value will be in touchpad distance per second.

type

(MagicLeapTouchpadGestureType) – [Read-Only] Type of gesture.