unreal.MagicLeapMovementComponent
¶
-
class
unreal.
MagicLeapMovementComponent
(outer=None, name='None')¶ Bases:
unreal.MovementComponent
LuminOS designed spatial movement for objects to feel like they have mass and inertia by tilting and swaying during movement, but still respecting the user’s desired placement. The component also offers two options for handling collision during movement (hard and soft). Hard collisions are basically the blocking collisions from the Engine. Soft collisions allow a degree of interpenetration before hitting an impenetrable core as defined by movement settings. Soft collisions are possible only with components that have an “Overlap” response for the moving component. By default the root SceneComponent of the owning Actor of this component is updated. Component to move can be changed by calling SetUpdatedComponent().
C++ Source:
Plugin: MagicLeapMovement
Module: MagicLeapMovement
File: MagicLeapMovementComponent.h
Editor Properties: (see get_editor_property/set_editor_property)
asset_user_data
(Array(AssetUserData)): [Read-Write] Array of user data stored with the componentauto_activate
(bool): [Read-Write] Whether the component is activated at creation or must be explicitly activated.auto_register_physics_volume_updates
(bool): [Read-Write] If true, then applies the value of bComponentShouldUpdatePhysicsVolume to the UpdatedComponent. If false, will not change bShouldUpdatePhysicsVolume on the UpdatedComponent at all. bComponentShouldUpdatePhysicsVolume:auto_register_updated_component
(bool): [Read-Write] If true, registers the owner’s Root component as the UpdatedComponent if there is not one currently assigned.auto_update_tick_registration
(bool): [Read-Write] If true, whenever the updated component is changed, this component will enable or disable its tick dependent on whether it has something to update. This will NOT enable tick at startup if bAutoActivate is false, because presumably you have a good reason for not wanting it to start ticking initially.can_ever_affect_navigation
(bool): [Read-Write] Whether this component can potentially influence navigationcomponent_should_update_physics_volume
(bool): [Read-Write] If true, enables bShouldUpdatePhysicsVolume on the UpdatedComponent during initialization from SetUpdatedComponent(), otherwise disables such updates. Only enabled if bAutoRegisterPhysicsVolumeUpdates is true. WARNING: UpdatePhysicsVolume is potentially expensive if overlap events are also disabled because it requires a separate query against all physics volumes in the world.component_tags
(Array(Name)): [Read-Write] Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.constrain_to_plane
(bool): [Read-Write] If true, movement will be constrained to a plane. PlaneConstraintNormal, PlaneConstraintOrigin, PlaneConstraintAxisSetting:editable_when_inherited
(bool): [Read-Write] True if this component can be modified when it was inherited from a parent actor classis_editor_only
(bool): [Read-Write] If true, the component will be excluded from non-editor buildsmovement_settings
(MagicLeapMovementSettings): [Read-Write] The settings to be used when transforming the attached object.on_component_activated
(ActorComponentActivatedSignature): [Read-Write] Called when the component has been activated, with parameter indicating if it was from a reseton_component_deactivated
(ActorComponentDeactivateSignature): [Read-Write] Called when the component has been deactivatedplane_constraint_axis_setting
(PlaneConstraintAxisSetting): [Read-Write] Setting that controls behavior when movement is restricted to a 2D plane defined by a specific axis/normal, so that movement along the locked axis is not be possible. SetPlaneConstraintAxisSetting:plane_constraint_normal
(Vector): [Read-Write] The normal or axis of the plane that constrains movement, if bConstrainToPlane is enabled. If for example you wanted to constrain movement to the X-Z plane (so that Y cannot change), the normal would be set to X=0 Y=1 Z=0. This is recalculated whenever PlaneConstraintAxisSetting changes. It is normalized once the component is registered with the game world. bConstrainToPlane, SetPlaneConstraintNormal(), SetPlaneConstraintFromVectors():plane_constraint_origin
(Vector): [Read-Write] The origin of the plane that constrains movement, if plane constraint is enabled. This defines the behavior of snapping a position to the plane, such as by SnapUpdatedComponentToPlane(). bConstrainToPlane, SetPlaneConstraintOrigin().:primary_component_tick
(ActorComponentTickFunction): [Read-Write] Main tick function for the Componentreplicates
(bool): [Read-Write] Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!settings3_dof
(MagicLeapMovement3DofSettings): [Read-Write] Additional settings to be used when transforming the attached object in 3DOF mode.settings6_dof
(MagicLeapMovement6DofSettings): [Read-Write] Additional settings to be used when transforming the attached object in 6DOF mode.slide_along_surface_on_blocking_hit
(bool): [Read-Write] In case of a blocking hit, slide the attached object along the hit surface.snap_to_plane_at_start
(bool): [Read-Write] If true and plane constraints are enabled, then the updated component will be snapped to the plane when first attached.soft_collide_with_overlapping_actors
(bool): [Read-Write] If true, attached object will have a degree of interpenetration with the overlapping objects. This changes the regular interaction of the attached object with overlapping components and gradually springs out of the overlapping volume instead of smoothly going through it. “Generate Overlap Event” should be enabled to use this feature.tick_before_owner
(bool): [Read-Write] If true, after registration we will add a tick dependency to tick before our owner (if we can both tick). This is important when our tick causes an update in the owner’s position, so that when the owner ticks it uses the most recent position without lag. Disabling this can improve performance if both objects tick but the order of ticks doesn’t matter.update_only_if_rendered
(bool): [Read-Write] If true, skips TickComponent() if UpdatedComponent was not recently rendered.updated_component
(SceneComponent): [Read-Write] The component we move and update. If this is null at startup and bAutoRegisterUpdatedComponent is true, the owning Actor’s root component will automatically be set as our UpdatedComponent at startup. bAutoRegisterUpdatedComponent, SetUpdatedComponent(), UpdatedPrimitive:updated_primitive
(PrimitiveComponent): [Read-Write] UpdatedComponent, cast as a UPrimitiveComponent. May be invalid if UpdatedComponent was null or not a UPrimitiveComponent.velocity
(Vector): [Read-Write] Current velocity of updated component.
-
attach_object_to_movement_controller
(movement_controller) → None¶ Sets the SceneComponent whose transform will control the movement according to the provided movement settings.
- Parameters
movement_controller (SceneComponent) – The SceneComponent to be used for movement. MotionControllerComponent is a common input here.
-
change_depth
(delta_depth) → bool¶ Changes the depth offset of the object from the user’s headpose (3Dof) or pointing device (6Dof).
-
change_rotation
(delta_degrees) → bool¶ Changes the rotation about the up-axis of the object being moved.
-
detach_object
(resolve_pending_soft_collisions=True) → None¶ Detaches the currently selected movement controller.
- Parameters
resolve_pending_soft_collisions (bool) – If true, soft collisions will continue to resolve after detaching.
-
get_default_settings
() → MagicLeapMovementSettings or None¶ Gets the default settings.
- Returns
True if the default settings were retrieved, false otherwise.
out_settings (MagicLeapMovementSettings): The default settings.
- Return type
-
property
movement_settings
¶ [Read-Write] The settings to be used when transforming the attached object.
- Type
-
property
settings3_dof
¶ [Read-Write] Additional settings to be used when transforming the attached object in 3DOF mode.
-
property
settings6_dof
¶ [Read-Write] Additional settings to be used when transforming the attached object in 6DOF mode.
-
property
slide_along_surface_on_blocking_hit
¶ [Read-Write] In case of a blocking hit, slide the attached object along the hit surface.
- Type
(bool)
-
property
soft_collide_with_overlapping_actors
¶ [Read-Write] If true, attached object will have a degree of interpenetration with the overlapping objects. This changes the regular interaction of the attached object with overlapping components and gradually springs out of the overlapping volume instead of smoothly going through it. “Generate Overlap Event” should be enabled to use this feature.
- Type
(bool)