unreal.Actor
¶
- class unreal.Actor(outer=None, name='None')¶
Bases:
unreal.Object
Actor is the base class for an Object that can be placed or spawned in a level. Actors may contain a collection of ActorComponents, which can be used to control how actors move, how they are rendered, etc. The other main function of an Actor is the replication of properties and function calls across the network during play.
Actor initialization has multiple steps, here’s the order of important virtual functions that get called: - UObject::PostLoad: For actors statically placed in a level, the normal UObject PostLoad gets called both in the editor and during gameplay.
This is not called for newly spawned actors.
- UActorComponent::OnComponentCreated: When an actor is spawned in the editor or during gameplay, this gets called for any native components.
For blueprint-created components, this gets called during construction for that component. This is not called for components loaded from a level.
- AActor::PreRegisterAllComponents: For statically placed actors and spawned actors that have native root components, this gets called now.
For blueprint actors without a native root component, these registration functions get called later during construction.
- UActorComponent::RegisterComponent: All components are registered in editor and at runtime, this creates their physical/visual representation.
These calls may be distributed over multiple frames, but are always after PreRegisterAllComponents. This may also get called later on after an UnregisterComponent call removes it from the world.
AActor::PostRegisterAllComponents: Called for all actors both in the editor and in gameplay, this is the last function that is called in all cases.
- AActor::PostActorCreated: When an actor is created in the editor or during gameplay, this gets called right before construction.
This is not called for components loaded from a level.
AActor::UserConstructionScript: Called for blueprints that implement a construction script.
- AActor::OnConstruction: Called at the end of ExecuteConstruction, which calls the blueprint construction script.
This is called after all blueprint-created components are fully created and registered. This is only called during gameplay for spawned actors, and may get rerun in the editor when changing blueprints.
- AActor::PreInitializeComponents: Called before InitializeComponent is called on the actor’s components.
This is only called during gameplay and in certain editor preview windows.
- UActorComponent::Activate: This will be called only if the component has bAutoActivate set.
It will also got called later on if a component is manually activated.
- UActorComponent::InitializeComponent: This will be called only if the component has bWantsInitializeComponentSet.
This only happens once per gameplay session.
AActor::PostInitializeComponents: Called after the actor’s components have been initialized, only during gameplay and some editor previews.
- AActor::BeginPlay: Called when the level starts ticking, only during actual gameplay.
This normally happens right after PostInitializeComponents but can be delayed for networked or child actors.
see: https://docs.unrealengine.com/Programming/UnrealArchitecture/Actors see: https://docs.unrealengine.com/Programming/UnrealArchitecture/Actors/ActorLifecycle see: UActorComponent
C++ Source:
Module: Engine
File: Actor.h
Editor Properties: (see get_editor_property/set_editor_property)
actor_guid
(Guid): [Read-Write] Actor Guid: The GUID for this actor.- Note: Don’t use VisibleAnywhere here to avoid getting the CPF_Edit flag and get this property reset when resetting to defaults.
See FActorDetails::AddActorCategory and EditorUtilities::CopySingleProperty for details.
allow_tick_before_begin_play
(bool): [Read-Write] Allow Tick Before Begin Play: Whether we allow this Actor to tick before it receives the BeginPlay event. Normally we don’t tick actors until after BeginPlay; this setting allows this behavior to be overridden. This Actor must be able to tick for this setting to be relevant.always_relevant
(bool): [Read-Write] Always Relevant: Always relevant for network (overrides bOnlyRelevantToOwner).auto_destroy_when_finished
(bool): [Read-Write] Auto Destroy when Finished: If true then destroy self when “finished”, meaning all relevant components report that they are done and no timelines or timers are in flight.auto_receive_input
(AutoReceiveInput): [Read-Write] Auto Receive Input: Automatically registers this actor to receive input from a player.block_input
(bool): [Read-Write] Block Input: If true, all input on the stack below this actor will not be consideredcall_pre_replication
(bool): [Read-Write] Call Pre Replicationcall_pre_replication_for_replay
(bool): [Read-Write] Call Pre Replication for Replaycan_be_damaged
(bool): [Read-Write] Can be Damaged: Whether this actor can take damage. Must be true for damage events (e.g. ReceiveDamage()) to be called. see: https://www.unrealengine.com/blog/damage-in-ue4 see: TakeDamage(), ReceiveDamage()can_be_in_cluster
(bool): [Read-Write] Can be in Cluster: If true, this actor can be put inside of a GC Cluster to improve Garbage Collection performancecustom_time_dilation
(float): [Read-Write] Custom Time Dilation: Allow each actor to run at a different time speed. The DeltaTime for a frame is multiplied by the global TimeDilation (in WorldSettings) and this CustomTimeDilation for this actor’s tick.data_layers
(Array(ActorDataLayer)): [Read-Write] Data Layers: DataLayers the actor belongs to.default_update_overlaps_method_during_level_streaming
(ActorUpdateOverlapsMethod): [Read-Only] Default Update Overlaps Method During Level Streaming: Default value taken from config file for this class when ‘UseConfigDefault’ is chosen for ‘UpdateOverlapsMethodDuringLevelStreaming’. This allows a default to be chosen per class in the matching config. For example, for Actor it could be specified in DefaultEngine.ini as:[/Script/Engine.Actor] DefaultUpdateOverlapsMethodDuringLevelStreaming = OnlyUpdateMovable
Another subclass could set their default to something different, such as:
[/Script/Engine.BlockingVolume] DefaultUpdateOverlapsMethodDuringLevelStreaming = NeverUpdate see: UpdateOverlapsMethodDuringLevelStreaming
enable_auto_lod_generation
(bool): [Read-Write] Enable Auto LODGeneration: Whether this actor should be considered or not during HLOD generation.find_camera_component_when_view_target
(bool): [Read-Write] Find Camera Component when View Target: If true, this actor should search for an owned camera component to view through when used as a view target.generate_overlap_events_during_level_streaming
(bool): [Read-Write] Generate Overlap Events During Level Streaming: If true, this actor will generate overlap Begin/End events when spawned as part of level streaming, which includes initial level load. You might enable this is in the case where a streaming level loads around an actor and you want Begin/End overlap events to trigger. see: UpdateOverlapsMethodDuringLevelStreaminghidden
(bool): [Read-Write] Hidden: Allows us to only see this Actor in the Editor, and not in the actual game. see: SetActorHiddenInGame()hlod_layer
(HLODLayer): [Read-Write] HLODLayer: The UHLODLayer in which this actor should be included.ignores_origin_shifting
(bool): [Read-Write] Ignores Origin Shifting: Whether this actor should not be affected by world origin shifting.initial_life_span
(float): [Read-Write] Initial Life Span: How long this Actor lives before dying, 0=forever. Note this is the INITIAL value and should not be modified once play has begun.input_priority
(int32): [Read-Write] Input Priority: The priority of this input component when pushed in to the stack.instigator
(Pawn): [Read-Write] Instigator: Pawn responsible for damage and other gameplay events caused by this actor.is_editor_only_actor
(bool): [Read-Write] Is Editor Only Actor: Whether this actor is editor-only. Use with care, as if this actor is referenced by anything else that reference will be NULL in cooked buildsis_spatially_loaded
(bool): [Read-Write] Is Spatially Loaded: Determine if this actor is spatially loaded when placed in a partitioned world.If true, this actor will be loaded when in the range of any streaming sources and if (1) in no data layers, or (2) one or more of its data layers are enabled. If false, this actor will be loaded if (1) in no data layers, or (2) one or more of its data layers are enabled.
layers
(Array(Name)): [Read-Write] Layers: Layers the actor belongs to. This is outside of the editoronly data to allow hiding of LD-specified layers at runtime for profiling.min_net_update_frequency
(float): [Read-Write] Min Net Update Frequency: Used to determine what rate to throttle down to when replicated properties are changing infrequentlynet_cull_distance_squared
(float): [Read-Write] Net Cull Distance Squared: Square of the max distance from the client’s viewpoint that this actor is relevant and will be replicated.net_dormancy
(NetDormancy): [Read-Write] Net Dormancy: Dormancy setting for actor to take itself off of the replication list without being destroyed on clients.net_load_on_client
(bool): [Read-Write] Net Load on Client: This actor will be loaded on network clients during map loadnet_priority
(float): [Read-Write] Net Priority: Priority for this actor when checking for replication in a low bandwidth or saturated situation, higher priority means it is more likely to replicatenet_update_frequency
(float): [Read-Write] Net Update Frequency: How often (per second) this actor will be considered for replication, used to determine NetUpdateTimenet_use_owner_relevancy
(bool): [Read-Write] Net Use Owner Relevancy: If actor has valid Owner, call Owner’s IsNetRelevantFor and GetNetPriorityon_actor_begin_overlap
(ActorBeginOverlapSignature): [Read-Write] On Actor Begin Overlap: Called when another actor begins to overlap this actor, for example a player walking into a trigger. For events when objects have a blocking collision, for example a player hitting a wall, see ‘Hit’ events. note: Components on both this and the other Actor must have bGenerateOverlapEvents set to true to generate overlap events.on_actor_end_overlap
(ActorEndOverlapSignature): [Read-Write] On Actor End Overlap: Called when another actor stops overlapping this actor. note: Components on both this and the other Actor must have bGenerateOverlapEvents set to true to generate overlap events.on_actor_hit
(ActorHitSignature): [Read-Write] On Actor Hit: Called when this Actor hits (or is hit by) something solid. This could happen due to things like Character movement, using Set Location with ‘sweep’ enabled, or physics simulation. For events when objects overlap (e.g. walking into a trigger) see the ‘Overlap’ event. note: For collisions during physics simulation to generate hit events, ‘Simulation Generates Hit Events’ must be enabled.on_begin_cursor_over
(ActorBeginCursorOverSignature): [Read-Write] On Begin Cursor Over: Called when the mouse cursor is moved over this actor if mouse over events are enabled in the player controller.on_clicked
(ActorOnClickedSignature): [Read-Write] On Clicked: Called when the left mouse button is clicked while the mouse is over this actor and click events are enabled in the player controller.on_destroyed
(ActorDestroyedSignature): [Read-Write] On Destroyed: Event triggered when the actor has been explicitly destroyed.on_end_cursor_over
(ActorEndCursorOverSignature): [Read-Write] On End Cursor Over: Called when the mouse cursor is moved off this actor if mouse over events are enabled in the player controller.on_end_play
(ActorEndPlaySignature): [Read-Write] On End Play: Event triggered when the actor is being deleted or removed from a level.on_input_touch_begin
(ActorOnInputTouchBeginSignature): [Read-Write] On Input Touch Begin: Called when a touch input is received over this actor when touch events are enabled in the player controller.on_input_touch_end
(ActorOnInputTouchEndSignature): [Read-Write] On Input Touch End: Called when a touch input is received over this component when touch events are enabled in the player controller.on_input_touch_enter
(ActorBeginTouchOverSignature): [Read-Write] On Input Touch Enter: Called when a finger is moved over this actor when touch over events are enabled in the player controller.on_input_touch_leave
(ActorEndTouchOverSignature): [Read-Write] On Input Touch Leave: Called when a finger is moved off this actor when touch over events are enabled in the player controller.on_released
(ActorOnReleasedSignature): [Read-Write] On Released: Called when the left mouse button is released while the mouse is over this actor and click events are enabled in the player controller.on_take_any_damage
(TakeAnyDamageSignature): [Read-Write] On Take Any Damage: Called when the actor is damaged in any way.on_take_point_damage
(TakePointDamageSignature): [Read-Write] On Take Point Damage: Called when the actor is damaged by point damage.on_take_radial_damage
(TakeRadialDamageSignature): [Read-Write] On Take Radial Damage: Called when the actor is damaged by radial damage.only_relevant_to_owner
(bool): [Read-Write] Only Relevant to Owner: If true, this actor is only relevant to its owner. If this flag is changed during play, all non-owner channels would need to be explicitly closed.optimize_bp_component_data
(bool): [Read-Write] Optimize BPComponent Data: Whether to cook additional data to speed up spawn events at runtime for any Blueprint classes based on this Actor. This option may slightly increase memory usage in a cooked build.pivot_offset
(Vector): [Read-Write] Pivot Offset: Local space pivot offset for the actor, only used in the editorprimary_actor_tick
(ActorTickFunction): [Read-Write] Primary Actor Tick: Primary Actor tick function, which calls TickActor(). Tick functions can be configured to control whether ticking is enabled, at what time during a frame the update occurs, and to set up tick dependencies. see: https://docs.unrealengine.com/API/Runtime/Engine/Engine/FTickFunction see: AddTickPrerequisiteActor(), AddTickPrerequisiteComponent()relevant_for_level_bounds
(bool): [Read-Write] Relevant for Level Bounds: If true, this actor’s component’s bounds will be included in the level’s bounding box unless the Actor’s class has overridden IsLevelBoundsRelevantreplay_rewindable
(bool): [Read-Write] Replay Rewindable: If true, this actor will only be destroyed during scrubbing if the replay is set to a time before the actor existed. Otherwise, RewindForReplay will be called if we detect the actor needs to be reset. Note, this Actor must not be destroyed by gamecode, and RollbackViaDeletion may not be used.replicate_movement
(bool): [Read-Write] Replicate Movement: If true, replicate movement/location related properties. Actor must also be set to replicate. see: SetReplicates() see: https://docs.unrealengine.com/InteractiveExperiences/Networking/Actorsreplicated_movement
(RepMovement): [Read-Write] Replicated Movement: Used for replication of our RootComponent’s position and velocityreplicates
(bool): [Read-Write] Replicates: If true, this actor will replicate to remote machines see: SetReplicates()root_component
(SceneComponent): [Read-Write] Root Component: The component that defines the transform (location, rotation, scale) of this Actor in the world, all other components must be attached to this one somehowruntime_grid
(Name): [Read-Write] Runtime Grid: Determine in which partition grid this actor will be placed in the partition (if the world is partitioned). If None, the decision will be left to the partition.spawn_collision_handling_method
(SpawnActorCollisionHandlingMethod): [Read-Write] Spawn Collision Handling Method: Controls how to handle spawning this actor in a situation where it’s colliding with something else. “Default” means AlwaysSpawn here.sprite_scale
(float): [Read-Write] Sprite Scale: The scale to apply to any billboard components in editor builds (happens in any WITH_EDITOR build, including non-cooked games).tags
(Array(Name)): [Read-Write] Tags: Array of tags that can be used for grouping and categorizing.update_overlaps_method_during_level_streaming
(ActorUpdateOverlapsMethod): [Read-Write] Update Overlaps Method During Level Streaming: Condition for calling UpdateOverlaps() to initialize overlap state when loaded in during level streaming. If set to ‘UseConfigDefault’, the default specified in ini (displayed in ‘DefaultUpdateOverlapsMethodDuringLevelStreaming’) will be used. If overlaps are not initialized, this actor and attached components will not have an initial state of what objects are touching it, and overlap events may only come in once one of those objects update overlaps themselves (for example when moving). However if an object touching it does initialize state, both objects will know about their touching state with each other. This can be a potentially large performance savings during level loading and streaming, and is safe if the object and others initially overlapping it do not need the overlap state because they will not trigger overlap notifications.Note that if ‘bGenerateOverlapEventsDuringLevelStreaming’ is true, overlaps are always updated in this case, but that flag determines whether the Begin/End overlap events are triggered. see: bGenerateOverlapEventsDuringLevelStreaming, DefaultUpdateOverlapsMethodDuringLevelStreaming, GetUpdateOverlapsMethodDuringLevelStreaming()
- acquire_editor_element_handle(allow_create=True) ScriptTypedElementHandle ¶
K2 Acquire Editor Actor Element Handle
- Parameters
allow_create (bool) –
- Return type
- property actor_guid¶
[Read-Only] Actor Guid: The GUID for this actor.
- Note: Don’t use VisibleAnywhere here to avoid getting the CPF_Edit flag and get this property reset when resetting to defaults.
See FActorDetails::AddActorCategory and EditorUtilities::CopySingleProperty for details.
- Type
(Guid)
- add_actor_local_offset(delta_location, sweep, teleport) HitResult ¶
Adds a delta to the location of this component in its local reference frame.
- Parameters
delta_location (Vector) –
sweep (bool) – Whether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
teleport (bool) – Whether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.
- Returns
sweep_hit_result (HitResult):
- Return type
- add_actor_local_rotation(delta_rotation, sweep, teleport) HitResult ¶
Adds a delta to the rotation of this component in its local reference frame
- Parameters
delta_rotation (Rotator) – The change in rotation in local space.
sweep (bool) – Whether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
teleport (bool) – Whether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.
- Returns
sweep_hit_result (HitResult):
- Return type
- add_actor_local_transform(new_transform, sweep, teleport) HitResult ¶
Adds a delta to the transform of this component in its local reference frame
- Parameters
new_transform (Transform) – The change in transform in local space.
sweep (bool) – Whether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
teleport (bool) – Whether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.
- Returns
sweep_hit_result (HitResult):
- Return type
- add_actor_world_offset(delta_location, sweep, teleport) HitResult ¶
Adds a delta to the location of this actor in world space.
- Parameters
delta_location (Vector) – The change in location.
sweep (bool) – Whether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
teleport (bool) – Whether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.
- Returns
sweep_hit_result (HitResult): The hit result from the move if swept.
- Return type
- add_actor_world_rotation(delta_rotation, sweep, teleport) HitResult ¶
Adds a delta to the rotation of this actor in world space.
- Parameters
delta_rotation (Rotator) – The change in rotation.
sweep (bool) – Whether to sweep to the target rotation (not currently supported for rotation).
teleport (bool) – Whether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.
- Returns
sweep_hit_result (HitResult): The hit result from the move if swept.
- Return type
- add_actor_world_transform(delta_transform, sweep, teleport) HitResult ¶
Adds a delta to the transform of this actor in world space. Ignores scale and sets it to (1,1,1).
- add_actor_world_transform_keep_scale(delta_transform, sweep, teleport) HitResult ¶
Adds a delta to the transform of this actor in world space. Scale is unchanged.
- add_tick_prerequisite_actor(prerequisite_actor) None ¶
Make this actor tick after PrerequisiteActor. This only applies to this actor’s tick function; dependencies for owned components must be set up separately if desired.
- Parameters
prerequisite_actor (Actor) –
- add_tick_prerequisite_component(prerequisite_component) None ¶
Make this actor tick after PrerequisiteComponent. This only applies to this actor’s tick function; dependencies for owned components must be set up separately if desired.
- Parameters
prerequisite_component (ActorComponent) –
- property always_relevant¶
[Read-Write] Always Relevant: Always relevant for network (overrides bOnlyRelevantToOwner).
- Type
(bool)
- attach_to_actor(parent_actor, socket_name, location_rule, rotation_rule, scale_rule, weld_simulated_bodies) None ¶
Attaches the RootComponent of this Actor to the supplied actor, optionally at a named socket.
- Parameters
parent_actor (Actor) – Actor to attach this actor’s RootComponent to
socket_name (Name) – Socket name to attach to, if any
location_rule (AttachmentRule) – How to handle translation when attaching.
rotation_rule (AttachmentRule) – How to handle rotation when attaching.
scale_rule (AttachmentRule) – How to handle scale when attaching.
weld_simulated_bodies (bool) – Whether to weld together simulated physics bodies.
- attach_to_component(parent, socket_name, location_rule, rotation_rule, scale_rule, weld_simulated_bodies) None ¶
Attaches the RootComponent of this Actor to the supplied component, optionally at a named socket. It is not valid to call this on components that are not Registered.
- Parameters
parent (SceneComponent) – Parent to attach to.
socket_name (Name) – Optional socket to attach to on the parent.
location_rule (AttachmentRule) – How to handle translation when attaching.
rotation_rule (AttachmentRule) – How to handle rotation when attaching.
scale_rule (AttachmentRule) – How to handle scale when attaching.
weld_simulated_bodies (bool) – Whether to weld together simulated physics bodies.
- property auto_destroy_when_finished¶
[Read-Write] Auto Destroy when Finished: If true then destroy self when “finished”, meaning all relevant components report that they are done and no timelines or timers are in flight.
- Type
(bool)
- property can_be_damaged¶
[Read-Write] Can be Damaged: Whether this actor can take damage. Must be true for damage events (e.g. ReceiveDamage()) to be called. see: https://www.unrealengine.com/blog/damage-in-ue4 see: TakeDamage(), ReceiveDamage()
- Type
(bool)
- property custom_time_dilation¶
[Read-Write] Custom Time Dilation: Allow each actor to run at a different time speed. The DeltaTime for a frame is multiplied by the global TimeDilation (in WorldSettings) and this CustomTimeDilation for this actor’s tick.
- Type
(float)
- detach_from_actor(location_rule=DetachmentRule.KEEP_RELATIVE, rotation_rule=DetachmentRule.KEEP_RELATIVE, scale_rule=DetachmentRule.KEEP_RELATIVE) None ¶
Detaches the RootComponent of this Actor from any SceneComponent it is currently attached to.
- Parameters
location_rule (DetachmentRule) – How to handle translation when detaching.
rotation_rule (DetachmentRule) – How to handle rotation when detaching.
scale_rule (DetachmentRule) – How to handle scale when detaching.
- disable_input(player_controller) None ¶
Removes this actor from the stack of input being handled by a PlayerController.
- Parameters
player_controller (PlayerController) – The PlayerController whose input events we no longer want to receive. If null, this actor will stop receiving input from all PlayerControllers.
- property enable_auto_lod_generation¶
[Read-Write] Enable Auto LODGeneration: Whether this actor should be considered or not during HLOD generation.
- Type
(bool)
- enable_input(player_controller) None ¶
Pushes this actor on to the stack of input being handled by a PlayerController.
- Parameters
player_controller (PlayerController) – The PlayerController whose input events we want to receive.
- property find_camera_component_when_view_target¶
[Read-Write] Find Camera Component when View Target: If true, this actor should search for an owned camera component to view through when used as a view target.
- Type
(bool)
- flush_net_dormancy() None ¶
Forces dormant actor to replicate but doesn’t change NetDormancy state (i.e., they will go dormant again if left dormant)
- property generate_overlap_events_during_level_streaming¶
[Read-Write] Generate Overlap Events During Level Streaming: If true, this actor will generate overlap Begin/End events when spawned as part of level streaming, which includes initial level load. You might enable this is in the case where a streaming level loads around an actor and you want Begin/End overlap events to trigger. see: UpdateOverlapsMethodDuringLevelStreaming
- Type
(bool)
- get_actor_bounds(only_colliding_components, include_from_child_actors=False) -> (origin=Vector, box_extent=Vector)¶
Returns the bounding box of all components that make up this Actor (excluding ChildActorComponents).
- Parameters
- Returns
origin (Vector): Set to the center of the actor in world space
box_extent (Vector): Set to half the actor’s size in 3d space
- Return type
tuple
- get_actor_eyes_view_point() -> (out_location=Vector, out_rotation=Rotator)¶
Returns the point of view of the actor. Note that this doesn’t mean the camera, but the ‘eyes’ of the actor. For example, for a Pawn, this would define the eye height location, and view rotation (which is different from the pawn rotation which has a zeroed pitch component). A camera first person view will typically use this view point. Most traces (weapon, AI) will be done from this view point.
- Returns
out_location (Vector): location of view point
out_rotation (Rotator): view rotation of actor.
- Return type
tuple
- get_actor_forward_vector() Vector ¶
Get the forward (X) vector (length 1.0) from this Actor, in world space.
- Return type
- get_actor_label(create_if_none=True) str ¶
Returns this actor’s current label. Actor labels are only available in development builds.
- get_actor_right_vector() Vector ¶
Get the right (Y) vector (length 1.0) from this Actor, in world space.
- Return type
- get_actor_tick_interval() float ¶
Returns the tick interval of this actor’s primary tick function
- Return type
- get_actor_time_dilation() float ¶
Get ActorTimeDilation - this can be used for input control or speed control for slomo. We don’t want to scale input globally because input can be used for UI, which do not care for TimeDilation.
- Return type
- get_actor_transform() Transform ¶
Get the actor-to-world transform.
- Returns
The transform that transforms from actor space to world space.
- Return type
- get_actor_up_vector() Vector ¶
Get the up (Z) vector (length 1.0) from this Actor, in world space.
- Return type
- get_all_child_actors(include_descendants=True)¶
Returns a list of all actors spawned by our Child Actor Components, including children of children. This does not return the contents of the Children array
- get_attach_parent_actor() Actor ¶
Walk up the attachment chain from RootComponent until we encounter a different actor, and return it. If we are not attached to a component in a different actor, returns nullptr
- Return type
- get_attach_parent_socket_name() Name ¶
Walk up the attachment chain from RootComponent until we encounter a different actor, and return the socket name in the component. If we are not attached to a component in a different actor, returns NAME_None
- Return type
- get_attached_actors(reset_array=True, recursively_include_attached_actors=False)¶
Find all Actors which are attached directly to a component in this actor
- get_component_by_class(component_class) ActorComponent ¶
Searches components array and returns first encountered component of the specified class
- Parameters
- Return type
- get_components_by_class(component_class)¶
Gets all the components that inherit from the given class. Currently returns an array of UActorComponent which must be cast to the correct type. This intended to only be used by blueprints. Use GetComponents() in C++.
- Parameters
- Return type
- get_components_by_interface(interface)¶
Gets all the components that implements the given interface.
- Parameters
- Return type
- get_components_by_tag(component_class, tag)¶
Gets all the components that inherit from the given class with a given tag.
- Parameters
- Return type
- get_default_actor_label() str ¶
Returns this actor’s default label (does not include any numeric suffix). Actor labels are only available in development builds.
- Return type
- get_dot_product_to(other_actor) float ¶
Returns the dot product from this Actor to OtherActor. Returns -2.0 on failure. Returns 0.0 for coincidental actors.
- get_folder_path() Name ¶
Returns this actor’s folder path. Actor folder paths are only available in development builds.
- Return type
- get_game_time_since_creation() float ¶
The number of seconds (in game time) since this Actor was created, relative to Get Game Time In Seconds.
- Return type
- get_horizontal_distance_to(other_actor) float ¶
Returns the distance from this Actor to OtherActor, ignoring Z.
- get_horizontal_dot_product_to(other_actor) float ¶
Returns the dot product from this Actor to OtherActor, ignoring Z. Returns -2.0 on failure. Returns 0.0 for coincidental actors.
- get_instigator() Pawn ¶
Returns the instigator for this actor, or nullptr if there is none.
- Return type
- get_instigator_controller() Controller ¶
Returns the instigator’s controller for this actor, or nullptr if there is none.
- Return type
- get_level_transform() Transform ¶
Return the FTransform of the level this actor is a part of.
- Return type
- get_life_span() float ¶
Get the remaining lifespan of this actor. If zero is returned the actor lives forever.
- Return type
- get_local_role() NetRole ¶
Returns how much control the local machine has over this actor.
- Return type
- get_overlapping_actors(class_filter=None)¶
Returns list of actors this actor is overlapping (any component overlapping any component). Does not return itself.
- get_overlapping_components()¶
Returns list of components this actor is overlapping.
- Returns
overlapping_components (Array(PrimitiveComponent)):
- Return type
- get_owner() Actor ¶
Get the owner of this Actor, used primarily for network replication.
- Return type
- get_parent_actor() Actor ¶
If this Actor was created by a Child Actor Component returns the Actor that owns that Child Actor Component
- Return type
- get_parent_component() ChildActorComponent ¶
If this Actor was created by a Child Actor Component returns that Child Actor Component
- Return type
- get_ray_tracing_group_id() int32 ¶
Return the RayTracingGroupId for this actor.
- Return type
int32
- get_remote_role() NetRole ¶
Returns how much control the remote machine has over this actor.
- Return type
- get_squared_distance_to(other_actor) float ¶
Returns the squared distance from this Actor to OtherActor.
- get_squared_horizontal_distance_to(other_actor) float ¶
Returns the squared distance from this Actor to OtherActor, ignoring Z.
- get_touching_actors(class_filter=None)¶
deprecated: ‘get_touching_actors’ was renamed to ‘get_overlapping_actors’.
- get_touching_components()¶
deprecated: ‘get_touching_components’ was renamed to ‘get_overlapping_components’.
- get_velocity() Vector ¶
Returns velocity (in cm/s (Unreal Units/second) of the rootcomponent if it is either using physics or has an associated MovementComponent
- Return type
- get_vertical_distance_to(other_actor) float ¶
Returns the distance from this Actor to OtherActor, ignoring XY.
- has_tag(tag)¶
deprecated: ‘has_tag’ was renamed to ‘actor_has_tag’.
[Read-Only] Hidden: Allows us to only see this Actor in the Editor, and not in the actual game. see: SetActorHiddenInGame()
- Type
(bool)
- property initial_life_span¶
[Read-Only] Initial Life Span: How long this Actor lives before dying, 0=forever. Note this is the INITIAL value and should not be modified once play has begun.
- Type
(float)
- property instigator¶
[Read-Write] Instigator: Pawn responsible for damage and other gameplay events caused by this actor.
- Type
(Pawn)
- is_actor_being_destroyed() bool ¶
Returns true if this actor is currently being destroyed, some gameplay events may be unsafe
- Return type
- is_child_actor() bool ¶
Returns whether this Actor was spawned by a child actor component
- Return type
- is_editable() bool ¶
Returns true if this actor is allowed to be displayed, selected and manipulated by the editor.
- Return type
Returns true if this actor is hidden in the editor viewports, also checking temporary flags.
- Return type
Returns true if the actor is hidden upon editor startup/by default, false if it is not
- Return type
- is_overlapping_actor(other) bool ¶
Check whether any component of this Actor is overlapping any component of another Actor.
- is_selectable() bool ¶
Returns true if this actor can EVER be selected in a level in the editor. Can be overridden by specific actors to make them unselectable.
- Return type
Returns whether or not this actor was explicitly hidden in the editor for the duration of the current editor session
- property life_span¶
‘life_span’ was renamed to ‘initial_life_span’.
- Type
deprecated
- make_noise(loudness=1.000000, noise_instigator=None, noise_location=[0.000000, 0.000000, 0.000000], max_range=0.000000, tag='None') None ¶
Trigger a noise caused by a given Pawn, at a given location. Note that the NoiseInstigator Pawn MUST have a PawnNoiseEmitterComponent for the noise to be detected by a PawnSensingComponent. Senders of MakeNoise should have an Instigator if they are not pawns, or pass a NoiseInstigator.
- Parameters
loudness (float) – The relative loudness of this noise. Usual range is 0 (no noise) to 1 (full volume). If MaxRange is used, this scales the max range, otherwise it affects the hearing range specified by the sensor.
noise_instigator (Pawn) – Pawn responsible for this noise. Uses the actor’s Instigator if NoiseInstigator is null
noise_location (Vector) – Position of noise source. If zero vector, use the actor’s location.
max_range (float) – Max range at which the sound may be heard. A value of 0 indicates no max range (though perception may have its own range). Loudness scales the range. (Note: not supported for legacy PawnSensingComponent, only for AIPerception)
tag (Name) – Identifier for the noise.
- property min_net_update_frequency¶
[Read-Write] Min Net Update Frequency: Used to determine what rate to throttle down to when replicated properties are changing infrequently
- Type
(float)
- property net_cull_distance_squared¶
[Read-Only] Net Cull Distance Squared: Square of the max distance from the client’s viewpoint that this actor is relevant and will be replicated.
- Type
(float)
- property net_dormancy¶
[Read-Only] Net Dormancy: Dormancy setting for actor to take itself off of the replication list without being destroyed on clients.
- Type
- property net_priority¶
[Read-Write] Net Priority: Priority for this actor when checking for replication in a low bandwidth or saturated situation, higher priority means it is more likely to replicate
- Type
(float)
- property net_update_frequency¶
[Read-Write] Net Update Frequency: How often (per second) this actor will be considered for replication, used to determine NetUpdateTime
- Type
(float)
- property net_use_owner_relevancy¶
[Read-Write] Net Use Owner Relevancy: If actor has valid Owner, call Owner’s IsNetRelevantFor and GetNetPriority
- Type
(bool)
- property on_actor_begin_overlap¶
[Read-Write] On Actor Begin Overlap: Called when another actor begins to overlap this actor, for example a player walking into a trigger. For events when objects have a blocking collision, for example a player hitting a wall, see ‘Hit’ events. note: Components on both this and the other Actor must have bGenerateOverlapEvents set to true to generate overlap events.
- Type
- property on_actor_end_overlap¶
[Read-Write] On Actor End Overlap: Called when another actor stops overlapping this actor. note: Components on both this and the other Actor must have bGenerateOverlapEvents set to true to generate overlap events.
- Type
- property on_actor_hit¶
[Read-Write] On Actor Hit: Called when this Actor hits (or is hit by) something solid. This could happen due to things like Character movement, using Set Location with ‘sweep’ enabled, or physics simulation. For events when objects overlap (e.g. walking into a trigger) see the ‘Overlap’ event. note: For collisions during physics simulation to generate hit events, ‘Simulation Generates Hit Events’ must be enabled.
- Type
- property on_actor_touch¶
‘on_actor_touch’ was renamed to ‘on_actor_begin_overlap’.
- Type
deprecated
- property on_actor_un_touch¶
‘on_actor_un_touch’ was renamed to ‘on_actor_end_overlap’.
- Type
deprecated
- on_become_view_target(pc) None ¶
Event called when this Actor becomes the view target for the given PlayerController.
- Parameters
pc (PlayerController) –
- property on_begin_cursor_over¶
[Read-Write] On Begin Cursor Over: Called when the mouse cursor is moved over this actor if mouse over events are enabled in the player controller.
- property on_clicked¶
[Read-Write] On Clicked: Called when the left mouse button is clicked while the mouse is over this actor and click events are enabled in the player controller.
- Type
- property on_destroyed¶
[Read-Write] On Destroyed: Event triggered when the actor has been explicitly destroyed.
- Type
- property on_end_cursor_over¶
[Read-Write] On End Cursor Over: Called when the mouse cursor is moved off this actor if mouse over events are enabled in the player controller.
- Type
- property on_end_play¶
[Read-Write] On End Play: Event triggered when the actor is being deleted or removed from a level.
- Type
- on_end_view_target(pc) None ¶
Event called when this Actor is no longer the view target for the given PlayerController.
- Parameters
pc (PlayerController) –
- property on_input_touch_begin¶
[Read-Write] On Input Touch Begin: Called when a touch input is received over this actor when touch events are enabled in the player controller.
- property on_input_touch_end¶
[Read-Write] On Input Touch End: Called when a touch input is received over this component when touch events are enabled in the player controller.
- property on_input_touch_enter¶
[Read-Write] On Input Touch Enter: Called when a finger is moved over this actor when touch over events are enabled in the player controller.
- Type
- property on_input_touch_leave¶
[Read-Write] On Input Touch Leave: Called when a finger is moved off this actor when touch over events are enabled in the player controller.
- Type
- property on_released¶
[Read-Write] On Released: Called when the left mouse button is released while the mouse is over this actor and click events are enabled in the player controller.
- Type
- on_reset() None ¶
Event called when this Actor is reset to its initial state - used when restarting level without reloading.
- property on_take_any_damage¶
[Read-Write] On Take Any Damage: Called when the actor is damaged in any way.
- Type
- property on_take_point_damage¶
[Read-Write] On Take Point Damage: Called when the actor is damaged by point damage.
- Type
- property on_take_radial_damage¶
[Read-Write] On Take Radial Damage: Called when the actor is damaged by radial damage.
- Type
- property only_relevant_to_owner¶
[Read-Only] Only Relevant to Owner: If true, this actor is only relevant to its owner. If this flag is changed during play, all non-owner channels would need to be explicitly closed.
- Type
(bool)
- property pivot_offset¶
[Read-Only] Pivot Offset: Local space pivot offset for the actor, only used in the editor
- Type
(Vector)
- prestream_textures(seconds, enable_streaming, cinematic_texture_groups=0) None ¶
Calls PrestreamTextures() for all the actor’s meshcomponents.
- receive_actor_begin_cursor_over() None ¶
Event when this actor has the mouse moved over it with the clickable interface.
- receive_actor_begin_overlap(other_actor) None ¶
Event when this actor overlaps another actor, for example a player walking into a trigger. For events when objects have a blocking collision, for example a player hitting a wall, see ‘Hit’ events. note: Components on both this and the other Actor must have bGenerateOverlapEvents set to true to generate overlap events.
- Parameters
other_actor (Actor) –
- receive_actor_end_cursor_over() None ¶
Event when this actor has the mouse moved off of it with the clickable interface.
- receive_actor_end_overlap(other_actor) None ¶
Event when an actor no longer overlaps another actor, and they have separated. note: Components on both this and the other Actor must have bGenerateOverlapEvents set to true to generate overlap events.
- Parameters
other_actor (Actor) –
- receive_actor_on_clicked(button_pressed) None ¶
Event when this actor is clicked by the mouse when using the clickable interface.
- Parameters
button_pressed (Key) –
- receive_actor_on_input_touch_begin(finger_index) None ¶
Event when this actor is touched when click events are enabled.
- Parameters
finger_index (TouchIndex) –
- receive_actor_on_input_touch_end(finger_index) None ¶
Event when this actor is under the finger when untouched when click events are enabled.
- Parameters
finger_index (TouchIndex) –
- receive_actor_on_input_touch_enter(finger_index) None ¶
Event when this actor has a finger moved over it with the clickable interface.
- Parameters
finger_index (TouchIndex) –
- receive_actor_on_input_touch_leave(finger_index) None ¶
Event when this actor has a finger moved off of it with the clickable interface.
- Parameters
finger_index (TouchIndex) –
- receive_actor_on_released(button_released) None ¶
Event when this actor is under the mouse when left mouse button is released while using the clickable interface.
- Parameters
button_released (Key) –
- receive_actor_touch(other_actor)¶
deprecated: ‘receive_actor_touch’ was renamed to ‘receive_actor_begin_overlap’.
- receive_actor_untouch(other_actor)¶
deprecated: ‘receive_actor_untouch’ was renamed to ‘receive_actor_end_overlap’.
- receive_any_damage(damage, damage_type, instigated_by, damage_causer) None ¶
Event when this actor takes ANY damage
- Parameters
damage (float) –
damage_type (DamageType) –
instigated_by (Controller) –
damage_causer (Actor) –
- receive_end_play(end_play_reason) None ¶
Event to notify blueprints this actor is being deleted or removed from a level.
- Parameters
end_play_reason (EndPlayReason) –
- receive_hit(my_comp, other, other_comp, self_moved, hit_location, hit_normal, normal_impulse, hit) None ¶
Event when this actor bumps into a blocking object, or blocks another actor that bumps into it. This could happen due to things like Character movement, using Set Location with ‘sweep’ enabled, or physics simulation. For events when objects overlap (e.g. walking into a trigger) see the ‘Overlap’ event. note: For collisions during physics simulation to generate hit events, ‘Simulation Generates Hit Events’ must be enabled. note: When receiving a hit from another object’s movement (bSelfMoved is false), the directions of ‘Hit.Normal’ and ‘Hit.ImpactNormal’ will be adjusted to indicate force from the other object against this object. note: NormalImpulse will be filled in for physics-simulating bodies, but will be zero for swept-component blocking collisions.
- Parameters
my_comp (PrimitiveComponent) –
other (Actor) –
other_comp (PrimitiveComponent) –
self_moved (bool) –
hit_location (Vector) –
hit_normal (Vector) –
normal_impulse (Vector) –
hit (HitResult) –
- receive_point_damage(damage, damage_type, hit_location, hit_normal, hit_component, bone_name, shot_from_direction, instigated_by, damage_causer, hit_info) None ¶
Event when this actor takes POINT damage
- Parameters
damage (float) –
damage_type (DamageType) –
hit_location (Vector) –
hit_normal (Vector) –
hit_component (PrimitiveComponent) –
bone_name (Name) –
shot_from_direction (Vector) –
instigated_by (Controller) –
damage_causer (Actor) –
hit_info (HitResult) –
- receive_radial_damage(damage_received, damage_type, origin, hit_info, instigated_by, damage_causer) None ¶
Event when this actor takes RADIAL damage
- Parameters
damage_received (float) –
damage_type (DamageType) –
origin (Vector) –
hit_info (HitResult) –
instigated_by (Controller) –
damage_causer (Actor) –
- receive_tick(delta_seconds) None ¶
Event called every frame, if ticking is enabled
- Parameters
delta_seconds (float) –
- remove_tick_prerequisite_actor(prerequisite_actor) None ¶
Remove tick dependency on PrerequisiteActor.
- Parameters
prerequisite_actor (Actor) –
- remove_tick_prerequisite_component(prerequisite_component) None ¶
Remove tick dependency on PrerequisiteComponent.
- Parameters
prerequisite_component (ActorComponent) –
- property replicates¶
[Read-Only] Replicates: If true, this actor will replicate to remote machines see: SetReplicates()
- Type
(bool)
- property root_component¶
[Read-Only] Root Component: The component that defines the transform (location, rotation, scale) of this Actor in the world, all other components must be attached to this one somehow
- Type
- set_actor_enable_collision(new_actor_enable_collision) None ¶
Allows enabling/disabling collision for the whole actor
- Parameters
new_actor_enable_collision (bool) –
deprecated: ‘set_actor_hidden’ was renamed to ‘set_actor_hidden_in_game’.
Sets the actor to be hidden in the game
- Parameters
new_hidden (bool) – Whether or not to hide the actor and all its components
- set_actor_label(new_actor_label, mark_dirty=True) None ¶
Assigns a new label to this actor. Actor labels are only available in development builds.
- Parameters
new_actor_label (str) – The new label string to assign to the actor. If empty, the actor will have a default label.
mark_dirty (bool) – If true the actor’s package will be marked dirty for saving. Otherwise it will not be. You should pass false for this parameter if dirtying is not allowed (like during loads)
- set_actor_location(new_location, sweep, teleport) HitResult or None ¶
Move the Actor to the specified location.
- Parameters
new_location (Vector) – The new location to move the Actor to.
sweep (bool) – Whether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
teleport (bool) – Whether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.
- Returns
Whether the location was successfully set (if not swept), or whether movement occurred at all (if swept).
sweep_hit_result (HitResult): The hit result from the move if swept.
- Return type
HitResult or None
- set_actor_location_and_rotation(new_location, new_rotation, sweep, teleport) HitResult or None ¶
Move the actor instantly to the specified location and rotation.
- Parameters
new_location (Vector) – The new location to teleport the Actor to.
new_rotation (Rotator) – The new rotation for the Actor.
sweep (bool) – Whether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
teleport (bool) – Whether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.
- Returns
Whether the rotation was successfully set.
sweep_hit_result (HitResult): The hit result from the move if swept.
- Return type
HitResult or None
- set_actor_relative_location(new_relative_location, sweep, teleport) HitResult ¶
Set the actor’s RootComponent to the specified relative location.
- Parameters
new_relative_location (Vector) – New relative location of the actor’s root component
sweep (bool) – Whether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
teleport (bool) – Whether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.
- Returns
sweep_hit_result (HitResult):
- Return type
- set_actor_relative_rotation(new_relative_rotation, sweep, teleport) HitResult ¶
Set the actor’s RootComponent to the specified relative rotation
- Parameters
new_relative_rotation (Rotator) – New relative rotation of the actor’s root component
sweep (bool) – Whether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
teleport (bool) – Whether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.
- Returns
sweep_hit_result (HitResult):
- Return type
- set_actor_relative_scale3d(new_relative_scale) None ¶
Set the actor’s RootComponent to the specified relative scale 3d
- Parameters
new_relative_scale (Vector) – New scale to set the actor’s RootComponent to
- set_actor_relative_transform(new_relative_transform, sweep, teleport) HitResult ¶
Set the actor’s RootComponent to the specified relative transform
- Parameters
new_relative_transform (Transform) – New relative transform of the actor’s root component
sweep (bool) – Whether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
teleport (bool) – Whether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.
- Returns
sweep_hit_result (HitResult):
- Return type
- set_actor_rotation(new_rotation, teleport_physics) bool ¶
Set the Actor’s rotation instantly to the specified rotation.
- Parameters
new_rotation (Rotator) – The new rotation for the Actor.
teleport_physics (bool) – Whether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts).
- Returns
Whether the rotation was successfully set.
- Return type
- set_actor_scale3d(new_scale3d) None ¶
Set the Actor’s world-space scale.
- Parameters
new_scale3d (Vector) –
- set_actor_tick_enabled(enabled) None ¶
Set this actor’s tick functions to be enabled or disabled. Only has an effect if the function is registered This only modifies the tick function on actor itself
- Parameters
enabled (bool) – Whether it should be enabled or not
- set_actor_tick_interval(tick_interval) None ¶
Sets the tick interval of this actor’s primary tick function. Will not enable a disabled tick function. Takes effect on next tick.
- Parameters
tick_interval (float) – The rate at which this actor should be ticking
- set_actor_transform(new_transform, sweep, teleport) HitResult or None ¶
Set the Actors transform to the specified one.
- Parameters
new_transform (Transform) – The new transform.
sweep (bool) – Whether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
teleport (bool) – Whether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.
- Returns
sweep_hit_result (HitResult):
- Return type
HitResult or None
- set_folder_path(new_folder_path) None ¶
Assigns a new folder to this actor. Actor folder paths are only available in development builds.
- Parameters
new_folder_path (Name) – The new folder to assign to the actor.
Explicitly sets whether or not this actor is hidden in the editor for the duration of the current editor session
- Parameters
is_hidden (bool) – True if the actor is hidden
- set_life_span(lifespan) None ¶
Set the lifespan of this actor. When it expires the object will be destroyed. If requested lifespan is 0, the timer is cleared and the actor will not be destroyed.
- Parameters
lifespan (float) –
- set_net_dormancy(new_dormancy) None ¶
Puts actor in dormant networking state
- Parameters
new_dormancy (NetDormancy) –
- set_owner(new_owner) None ¶
Set the owner of this Actor, used primarily for network replication.
- Parameters
new_owner (Actor) – The Actor who takes over ownership of this Actor
- set_ray_tracing_group_id(raytracing_group_id) None ¶
Specify a RayTracingGroupId for this actors. Components with invalid RayTracingGroupId will inherit the actors.
- Parameters
raytracing_group_id (int32) –
- set_replicate_movement(replicate_movement) None ¶
Set whether this actor’s movement replicates to network clients.
- Parameters
replicate_movement (bool) – Whether this Actor’s movement replicates to clients.
- set_replicates(replicates) None ¶
Set whether this actor replicates to network clients. When this actor is spawned on the server it will be sent to clients as well. Properties flagged for replication will update on clients if they change on the server. Internally changes the RemoteRole property and handles the cases where the actor needs to be added to the network actor list. see: https://docs.unrealengine.com/InteractiveExperiences/Networking/Actors
- Parameters
replicates (bool) – Whether this Actor replicates to network clients.
- set_tick_enabled(enabled)¶
deprecated: ‘set_tick_enabled’ was renamed to ‘set_actor_tick_enabled’.
- set_tick_group(new_tick_group) None ¶
Sets the ticking group for this actor.
- Parameters
new_tick_group (TickingGroup) – the new value to assign
- set_tick_prerequisite(prerequisite_actor)¶
deprecated: ‘set_tick_prerequisite’ was renamed to ‘add_tick_prerequisite_actor’.
- set_tickable_when_paused(tickable_when_paused) None ¶
Sets whether this actor can tick when paused.
- Parameters
tickable_when_paused (bool) –
- property spawn_collision_handling_method¶
[Read-Write] Spawn Collision Handling Method: Controls how to handle spawning this actor in a situation where it’s colliding with something else. “Default” means AlwaysSpawn here.
- property sprite_scale¶
[Read-Write] Sprite Scale: The scale to apply to any billboard components in editor builds (happens in any WITH_EDITOR build, including non-cooked games).
- Type
(float)
- property tags¶
[Read-Write] Tags: Array of tags that can be used for grouping and categorizing.
- tear_off() None ¶
Networking - Server - TearOff this actor to stop replication to clients. Will set bTearOff to true.
- teleport(dest_location, dest_rotation) bool ¶
Teleport this actor to a new location. If the actor doesn’t fit exactly at the location specified, tries to slightly move it out of walls and such.
- was_recently_rendered(tolerance=0.200000) bool ¶
Returns true if this actor has been rendered “recently”, with a tolerance in seconds to define what “recent” means. e.g.: If a tolerance of 0.1 is used, this function will return true only if the actor was rendered in the last 0.1 seconds of game time.