unreal.SceneComponent

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

Bases: unreal.ActorComponent

A SceneComponent has a transform and supports attachment, but has no rendering or collision capabilities. Useful as a ‘dummy’ component in the hierarchy to offset others. see: [Scene Components](https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/Actors/Components/index.html#scenecomponents)

C++ Source:

  • Module: Engine

  • File: SceneComponent.h

Editor Properties: (see get_editor_property/set_editor_property)

  • absolute_location (bool): [Read-Write] Absolute Location: If RelativeLocation should be considered relative to the world, rather than the parent

  • absolute_rotation (bool): [Read-Write] Absolute Rotation: If RelativeRotation should be considered relative to the world, rather than the parent

  • absolute_scale (bool): [Read-Write] Absolute Scale: If RelativeScale3D should be considered relative to the world, rather than the parent

  • asset_user_data (Array(AssetUserData)): [Read-Write] Asset User Data: Array of user data stored with the component

  • auto_activate (bool): [Read-Write] Auto Activate: Whether the component is activated at creation or must be explicitly activated.

  • can_ever_affect_navigation (bool): [Read-Write] Can Ever Affect Navigation: Whether this component can potentially influence navigation

  • component_tags (Array(Name)): [Read-Write] Component Tags: Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.

  • detail_mode (DetailMode): [Read-Write] Detail Mode: If detail mode is >= system detail mode, primitive won’t be rendered.

  • editable_when_inherited (bool): [Read-Write] Editable when Inherited: True if this component can be modified when it was inherited from a parent actor class

  • hidden_in_game (bool): [Read-Write] Hidden in Game: Whether to hide the primitive in game, if the primitive is Visible.

  • is_editor_only (bool): [Read-Write] Is Editor Only: If true, the component will be excluded from non-editor builds

  • mobility (ComponentMobility): [Read-Write] Mobility: How often this component is allowed to move, used to make various optimizations. Only safe to set in constructor.

  • on_component_activated (ActorComponentActivatedSignature): [Read-Write] On Component Activated: Called when the component has been activated, with parameter indicating if it was from a reset

  • on_component_deactivated (ActorComponentDeactivateSignature): [Read-Write] On Component Deactivated: Called when the component has been deactivated

  • physics_volume_changed_delegate (PhysicsVolumeChanged): [Read-Write] Physics Volume Changed Delegate: Delegate that will be called when PhysicsVolume has been changed *

  • primary_component_tick (ActorComponentTickFunction): [Read-Write] Primary Component Tick: Main tick function for the Component

  • relative_location (Vector): [Read-Write] Relative Location: Location of the component relative to its parent

  • relative_rotation (Rotator): [Read-Write] Relative Rotation: Rotation of the component relative to its parent

  • relative_scale3d (Vector): [Read-Write] Relative Scale 3D: Non-uniform scaling of the component relative to its parent. Note that scaling is always applied in local space (no shearing etc)

  • replicates (bool): [Read-Write] Replicates: Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!

  • should_update_physics_volume (bool): [Read-Write] Should Update Physics Volume: Whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved. see: GetPhysicsVolume()

  • use_attach_parent_bound (bool): [Read-Write] Use Attach Parent Bound: If true, this component uses its parents bounds when attached. This can be a significant optimization with many components attached together.

  • visible (bool): [Read-Write] Visible: Whether to completely draw the primitive; if false, the primitive is not drawn, does not cast a shadow.

property absolute_location

[Read-Write] Absolute Location: If RelativeLocation should be considered relative to the world, rather than the parent

Type

(bool)

property absolute_rotation

[Read-Write] Absolute Rotation: If RelativeRotation should be considered relative to the world, rather than the parent

Type

(bool)

property absolute_scale

[Read-Write] Absolute Scale: If RelativeScale3D should be considered relative to the world, rather than the parent

Type

(bool)

add_local_offset(delta_location, sweep, teleport) HitResult

Adds a delta to the location of the component in its local reference frame

Parameters
  • delta_location (Vector) – Change in location of the component in its local reference frame.

  • 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 sweep volume.

Returns

sweep_hit_result (HitResult): Hit result from any impact if sweep is true.

Return type

HitResult

add_local_rotation(delta_rotation, sweep, teleport) HitResult

Adds a delta to the rotation of the component in its local reference frame

Parameters
  • delta_rotation (Rotator) – Change in rotation of the component in its local reference frame.

  • sweep (bool) – Whether we sweep to the destination (currently not 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).

Returns

sweep_hit_result (HitResult): Hit result from any impact if sweep is true.

Return type

HitResult

add_local_transform(delta_transform, sweep, teleport) HitResult

Adds a delta to the transform of the component in its local reference frame. Scale is unchanged.

Parameters
  • delta_transform (Transform) – Change in transform of the component in its local reference frame. Scale is unchanged.

  • 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 sweep volume.

Returns

sweep_hit_result (HitResult): Hit result from any impact if sweep is true.

Return type

HitResult

add_relative_location(delta_location, sweep, teleport) HitResult

Adds a delta to the translation of the component relative to its parent

Parameters
  • delta_location (Vector) – Change in location of the component relative to its parent

  • 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 sweep volume.

Returns

sweep_hit_result (HitResult): Hit result from any impact if sweep is true.

Return type

HitResult

add_relative_rotation(delta_rotation, sweep, teleport) HitResult

Adds a delta the rotation of the component relative to its parent

Parameters
  • delta_rotation (Rotator) – Change in rotation of the component relative to is parent.

  • sweep (bool) – Whether we sweep to the destination (currently not 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).

Returns

sweep_hit_result (HitResult): Hit result from any impact if sweep is true.

Return type

HitResult

add_world_offset(delta_location, sweep, teleport) HitResult

Adds a delta to the location of the component in world space.

Parameters
  • delta_location (Vector) – Change in location in world space for the 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 sweep volume.

Returns

sweep_hit_result (HitResult): Hit result from any impact if sweep is true.

Return type

HitResult

add_world_rotation(delta_rotation, sweep, teleport) HitResult

Adds a delta to the rotation of the component in world space.

Parameters
  • delta_rotation (Rotator) – Change in rotation in world space for the component.

  • sweep (bool) – Whether we sweep to the destination (currently not 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 sweep volume.

Returns

sweep_hit_result (HitResult): Hit result from any impact if sweep is true.

Return type

HitResult

add_world_transform(delta_transform, sweep, teleport) HitResult

Adds a delta to the transform of the component in world space. Ignores scale and sets it to (1,1,1).

Parameters
  • delta_transform (Transform) – Change in transform in world space for the component. Scale is ignored.

  • 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 sweep volume.

Returns

sweep_hit_result (HitResult): Hit result from any impact if sweep is true.

Return type

HitResult

add_world_transform_keep_scale(delta_transform, sweep, teleport) HitResult

Adds a delta to the transform of the component in world space. Scale is unchanged.

Parameters
  • delta_transform (Transform) – Change in transform in world space for the component. Scale is ignored since we preserve the original scale.

  • 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 sweep volume.

Returns

sweep_hit_result (HitResult): Hit result from any impact if sweep is true.

Return type

HitResult

attach_to(parent, socket_name='None', attach_type=AttachLocation.KEEP_RELATIVE_OFFSET, weld_simulated_bodies=True)

deprecated: ‘attach_to’ was renamed to ‘k2_attach_to’.

attach_to_component(parent, socket_name, location_rule, rotation_rule, scale_rule, weld_simulated_bodies) bool

Attach this component to another scene component, optionally at a named socket. It is valid to call this on components whether or not they have been 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.

Returns

True if attachment is successful (or already attached to requested parent/socket), false if attachment is rejected and there is no change in AttachParent.

Return type

bool

property b_absolute_translation

‘b_absolute_translation’ was renamed to ‘absolute_location’.

Type

deprecated

detach_from_component(location_rule=DetachmentRule.KEEP_RELATIVE, rotation_rule=DetachmentRule.KEEP_RELATIVE, scale_rule=DetachmentRule.KEEP_RELATIVE, call_modify=True) None

Detach this component from whatever it is attached to. Automatically unwelds components that are welded together (See WeldTo)

Parameters
  • location_rule (DetachmentRule) – How to handle translations when detaching.

  • rotation_rule (DetachmentRule) – How to handle rotation when detaching.

  • scale_rule (DetachmentRule) – How to handle scales when detaching.

  • call_modify (bool) – If true, call Modify() on the component and the current attach parent component

detach_from_parent(maintain_world_position=False, call_modify=True) None

Detach from Parent

Parameters
  • maintain_world_position (bool) –

  • call_modify (bool) –

property detail_mode

[Read-Only] Detail Mode: If detail mode is >= system detail mode, primitive won’t be rendered.

Type

(DetailMode)

does_socket_exist(socket_name) bool

Return true if socket with the given name exists

Parameters

socket_name (Name) – Name of the socket or the bone to get the transform

Return type

bool

get_all_socket_names()

Gets the names of all the sockets on the component.

Returns

Get the names of all the sockets on the component.

Return type

Array(Name)

get_attach_parent() SceneComponent

Get the SceneComponent we are attached to.

Return type

SceneComponent

get_attach_socket_name() Name

Get the socket we are attached to.

Return type

Name

get_child_component(child_index) SceneComponent

Gets the attached child component at the specified location

Parameters

child_index (int32) –

Return type

SceneComponent

get_children_components(include_all_descendants)

Gets all components that are attached to this component, possibly recursively

Parameters

include_all_descendants (bool) – Whether to include all descendants in the list of children (i.e. grandchildren, great grandchildren, etc.)

Returns

children (Array(SceneComponent)): The list of attached child components

Return type

Array(SceneComponent)

get_component_velocity() Vector

Get velocity of the component: either ComponentVelocity, or the velocity of the physics body if simulating physics.

Returns

Velocity of the component

Return type

Vector

get_forward_vector() Vector

Get the forward (X) unit direction vector from this component, in world space.

Return type

Vector

get_num_children_components() int32

Gets the number of attached children components

Return type

int32

get_parent_components()

Gets all attachment parent components up to and including the root component

Returns

parents (Array(SceneComponent)):

Return type

Array(SceneComponent)

get_physics_volume() PhysicsVolume

Get the PhysicsVolume overlapping this component.

Return type

PhysicsVolume

get_relative_transform() Transform

Returns the transform of the component relative to its parent

Return type

Transform

get_right_vector() Vector

Get the right (Y) unit direction vector from this component, in world space.

Return type

Vector

get_socket_location(socket_name) Vector

Get world-space socket or bone location.

Parameters

socket_name (Name) – Name of the socket or the bone to get the transform

Returns

Socket transform in world space if socket if found. Otherwise it will return component’s transform in world space.

Return type

Vector

get_socket_quaternion(socket_name) Quat

Get world-space socket or bone FQuat rotation. deprecated: Use GetSocketRotation instead, Quat is not fully supported in blueprints.

Parameters

socket_name (Name) – Name of the socket or the bone to get the transform

Returns

Socket transform in world space if socket if found. Otherwise it will return component’s transform in world space.

Return type

Quat

get_socket_rotation(socket_name) Rotator

Get world-space socket or bone FRotator rotation.

Parameters

socket_name (Name) – Name of the socket or the bone to get the transform

Returns

Socket transform in world space if socket if found. Otherwise it will return component’s transform in world space.

Return type

Rotator

get_socket_transform(socket_name, transform_space=RelativeTransformSpace.RTS_WORLD) Transform

Get world-space socket transform.

Parameters
Returns

Socket transform in world space if socket if found. Otherwise it will return component’s transform in world space.

Return type

Transform

get_up_vector() Vector

Get the up (Z) unit direction vector from this component, in world space.

Return type

Vector

get_world_location() Vector

Return location of the component, in world space

Return type

Vector

get_world_rotation() Rotator

Returns rotation of the component, in world space.

Return type

Rotator

get_world_scale() Vector

Returns scale of the component, in world space.

Return type

Vector

get_world_transform() Transform

Get the current component-to-world transform for this component

Return type

Transform

property hidden_in_game

[Read-Only] Hidden in Game: Whether to hide the primitive in game, if the primitive is Visible.

Type

(bool)

is_any_simulating_physics() bool

Returns whether the specified body is currently using physics simulation

Return type

bool

is_simulating_physics(bone_name='None') bool

Returns whether the specified body is currently using physics simulation

Parameters

bone_name (Name) –

Return type

bool

is_visible() bool

Returns true if this component is visible in the current context

Return type

bool

k2_attach_to(parent, socket_name='None', attach_type=AttachLocation.KEEP_RELATIVE_OFFSET, weld_simulated_bodies=True) bool

K2 Attach To

Parameters
Return type

bool

property mobility

[Read-Only] Mobility: How often this component is allowed to move, used to make various optimizations. Only safe to set in constructor.

Type

(ComponentMobility)

property modify_frequency

‘modify_frequency’ was renamed to ‘mobility’.

Type

deprecated

property physics_volume_changed_delegate

[Read-Write] Physics Volume Changed Delegate: Delegate that will be called when PhysicsVolume has been changed *

Type

(PhysicsVolumeChanged)

property relative_location

[Read-Only] Relative Location: Location of the component relative to its parent

Type

(Vector)

property relative_rotation

[Read-Only] Relative Rotation: Rotation of the component relative to its parent

Type

(Rotator)

property relative_scale3d

[Read-Only] Relative Scale 3D: Non-uniform scaling of the component relative to its parent. Note that scaling is always applied in local space (no shearing etc)

Type

(Vector)

property relative_translation

‘relative_translation’ was renamed to ‘relative_location’.

Type

deprecated

reset_relative_transform() None

Reset the transform of the component relative to its parent. Sets relative location to zero, relative rotation to no rotation, and Scale to 1.

set_absolute(new_absolute_location=False, new_absolute_rotation=False, new_absolute_scale=False) None

Set which parts of the relative transform should be relative to parent, and which should be relative to world

Parameters
  • new_absolute_location (bool) –

  • new_absolute_rotation (bool) –

  • new_absolute_scale (bool) –

set_hidden_in_game(new_hidden, propagate_to_children=False) None

Changes the value of bHiddenInGame, if false this will disable Visibility during gameplay

Parameters
  • new_hidden (bool) –

  • propagate_to_children (bool) –

set_mobility(new_mobility) None

Set how often this component is allowed to move during runtime. Causes a component re-register if the component is already registered

Parameters

new_mobility (ComponentMobility) –

set_relative_location(new_location, sweep, teleport) HitResult

Set the location of the component relative to its parent

Parameters
  • new_location (Vector) – New location of the component relative to its parent.

  • 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 sweep volume.

Returns

sweep_hit_result (HitResult): Hit result from any impact if sweep is true.

Return type

HitResult

set_relative_location_and_rotation(new_location, new_rotation, sweep, teleport) HitResult

Set the location and rotation of the component relative to its parent

Parameters
  • new_location (Vector) – New location of the component relative to its parent.

  • new_rotation (Rotator) – New rotation of the component relative to its parent.

  • 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 sweep volume.

Returns

sweep_hit_result (HitResult): Hit result from any impact if sweep is true.

Return type

HitResult

set_relative_rotation(new_rotation, sweep, teleport) HitResult

Set the rotation of the component relative to its parent

Parameters
  • new_rotation (Rotator) – New rotation of the component relative to its parent

  • sweep (bool) – Whether we sweep to the destination (currently not 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).

Returns

sweep_hit_result (HitResult): Hit result from any impact if sweep is true.

Return type

HitResult

set_relative_scale3d(new_scale3d) None

Set the non-uniform scale of the component relative to its parent

Parameters

new_scale3d (Vector) –

set_relative_transform(new_transform, sweep, teleport) HitResult

Set the transform of the component relative to its parent

Parameters
  • new_transform (Transform) – New transform of the component relative to its parent.

  • sweep (bool) – Whether we sweep to the destination (currently not 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).

Returns

sweep_hit_result (HitResult): Hit result from any impact if sweep is true.

Return type

HitResult

set_visibility(new_visibility, propagate_to_children=False) None

Set visibility of the component, if during game use this to turn on/off

Parameters
  • new_visibility (bool) –

  • propagate_to_children (bool) –

set_world_location(new_location, sweep, teleport) HitResult

Put this component at the specified location in world space. Updates relative location to achieve the final world location.

Parameters
  • new_location (Vector) – New location in world space for the 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 sweep volume.

Returns

sweep_hit_result (HitResult): Hit result from any impact if sweep is true.

Return type

HitResult

set_world_location_and_rotation(new_location, new_rotation, sweep, teleport) HitResult

Set the relative location and rotation of the component to put it at the supplied pose in world space.

Parameters
  • new_location (Vector) – New location in world space for the component.

  • new_rotation (Rotator) – New rotation in world space for the 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 sweep volume.

Returns

sweep_hit_result (HitResult): Hit result from any impact if sweep is true.

Return type

HitResult

set_world_rotation(new_rotation, sweep, teleport) HitResult
  • Put this component at the specified rotation in world space. Updates relative rotation to achieve the final world rotation.

Parameters
  • new_rotation (Rotator) – New rotation in world space for the component. *

  • sweep (bool) – Whether we sweep to the destination (currently not 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 sweep volume.

Returns

sweep_hit_result (HitResult): Hit result from any impact if sweep is true. *

Return type

HitResult

set_world_scale3d(new_scale) None

Set the relative scale of the component to put it at the supplied scale in world space.

Parameters

new_scale (Vector) – New scale in world space for this component.

set_world_transform(new_transform, sweep, teleport) HitResult

Set the transform of the component in world space.

Parameters
  • new_transform (Transform) – New transform in world space for the 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 sweep volume.

Returns

sweep_hit_result (HitResult): Hit result from any impact if sweep is true.

Return type

HitResult

property should_update_physics_volume

[Read-Write] Should Update Physics Volume: Whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved. see: GetPhysicsVolume()

Type

(bool)

toggle_visibility(propagate_to_children=False) None

Toggle visibility of the component

Parameters

propagate_to_children (bool) –

property use_attach_parent_bound

[Read-Write] Use Attach Parent Bound: If true, this component uses its parents bounds when attached. This can be a significant optimization with many components attached together.

Type

(bool)

property visible

[Read-Only] Visible: Whether to completely draw the primitive; if false, the primitive is not drawn, does not cast a shadow.

Type

(bool)