unreal.LeapComponent

class unreal.LeapComponent(outer=None, name='None')

Bases: unreal.ActorComponent

Leap Component

C++ Source:

  • Plugin: LeapMotion
  • Module: LeapMotion
  • File: LeapComponent.h

Editor Properties: (see get_editor_property/set_editor_property)

  • asset_user_data (Array(AssetUserData)): [Read-Write] Array of user data stored with the component
  • auto_activate (bool): [Read-Write] Whether the component is activated at creation or must be explicitly activated.
  • can_ever_affect_navigation (bool): [Read-Write] Whether this component can potentially influence navigation
  • component_tags (Array(Name)): [Read-Write] Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.
  • editable_when_inherited (bool): [Read-Write] True if this component can be modified when it was inherited from a parent actor class
  • is_editor_only (bool): [Read-Write] If true, the component will be excluded from non-editor builds
  • on_component_activated (ActorComponentActivatedSignature): [Read-Write] Called when the component has been activated, with parameter indicating if it was from a reset
  • on_component_deactivated (ActorComponentDeactivateSignature): [Read-Write] Called when the component has been deactivated
  • on_hand_begin_tracking (LeapHandSignature): [Read-Write] Event called when a leap hand enters the field of view and begins tracking
  • on_hand_end_tracking (LeapHandSignature): [Read-Write] Event called when a leap hand exits the field of view and stops tracking
  • on_hand_grabbed (LeapHandSignature): [Read-Write] Event called when a leap hand grab gesture is detected
  • on_hand_pinched (LeapHandSignature): [Read-Write] Event called when a leap hand pinch gesture is detected
  • on_hand_released (LeapHandSignature): [Read-Write] Event called when a leap hand release gesture is detected
  • on_hand_unpinched (LeapHandSignature): [Read-Write] Event called when a leap hand unpinch gesture is detected
  • on_image_event (LeapImageEventSignature): [Read-Write] Event called when a device image is ready. Requires setting image policy first
  • on_leap_device_attached (LeapDeviceSignature): [Read-Write] Called when a device connects to the leap service, this may happen before the game starts and you may not get the call
  • on_leap_device_detatched (LeapDeviceSignature): [Read-Write] Called when a device disconnects from the leap service
  • on_leap_policies_updated (LeapPolicySignature): [Read-Write] Event called when leap policies have changed
  • on_leap_service_connected (LeapEventSignature): [Read-Write] Event called when the leap service connects. Will likely be called before game begin play so some component won’t receive this call.
  • on_leap_service_disconnected (LeapEventSignature): [Read-Write] Event called if leap service connection gets lost. Track won’t work if this event gets called.
  • on_leap_tracking_data (LeapFrameSignature): [Read-Write] Event called when new tracking data is available, typically every game tick.
  • on_left_hand_visibility_changed (LeapVisibilityBoolSignature): [Read-Write] Event called when the left hand tracking changes
  • on_right_hand_visibility_changed (LeapVisibilityBoolSignature): [Read-Write] Event called when the right hand begins tracking
  • primary_component_tick (ActorComponentTickFunction): [Read-Write] Main tick function for the Component
  • replicates (bool): [Read-Write] Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
  • tracking_mode (LeapMode): [Read-Write] Tracking mode optimization
are_hands_visible() -> (left_is_visible=bool, right_is_visible=bool)

Utility function to check if a hand is visible and tracked at this moment

Returns:left_is_visible (bool):

right_is_visible (bool):

Return type:tuple
get_latest_frame_data() → LeapFrameData

Polling function to get latest data

Returns:out_data (LeapFrameData):
Return type:LeapFrameData
on_hand_begin_tracking

(LeapHandSignature) – [Read-Write] Event called when a leap hand enters the field of view and begins tracking

on_hand_end_tracking

(LeapHandSignature) – [Read-Write] Event called when a leap hand exits the field of view and stops tracking

on_hand_grabbed

(LeapHandSignature) – [Read-Write] Event called when a leap hand grab gesture is detected

on_hand_pinched

(LeapHandSignature) – [Read-Write] Event called when a leap hand pinch gesture is detected

on_hand_released

(LeapHandSignature) – [Read-Write] Event called when a leap hand release gesture is detected

on_hand_unpinched

(LeapHandSignature) – [Read-Write] Event called when a leap hand unpinch gesture is detected

on_image_event

(LeapImageEventSignature) – [Read-Write] Event called when a device image is ready. Requires setting image policy first

on_leap_device_attached

(LeapDeviceSignature) – [Read-Write] Called when a device connects to the leap service, this may happen before the game starts and you may not get the call

on_leap_device_detatched

(LeapDeviceSignature) – [Read-Write] Called when a device disconnects from the leap service

on_leap_policies_updated

(LeapPolicySignature) – [Read-Write] Event called when leap policies have changed

on_leap_service_connected

(LeapEventSignature) – [Read-Write] Event called when the leap service connects. Will likely be called before game begin play so some component won’t receive this call.

on_leap_service_disconnected

(LeapEventSignature) – [Read-Write] Event called if leap service connection gets lost. Track won’t work if this event gets called.

on_leap_tracking_data

(LeapFrameSignature) – [Read-Write] Event called when new tracking data is available, typically every game tick.

on_left_hand_visibility_changed

(LeapVisibilityBoolSignature) – [Read-Write] Event called when the left hand tracking changes

on_right_hand_visibility_changed

(LeapVisibilityBoolSignature) – [Read-Write] Event called when the right hand begins tracking

tracking_mode

(LeapMode) – [Read-Only] Tracking mode optimization