G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
UMovementComponent Class Reference

MovementComponent is an abstract component class that defines functionality for moving a PrimitiveComponent (our UpdatedComponent) each tick. Base functionality includes: More...

Public Member Functions

Components|Movement|Planar
const FVector & GetPlaneConstraintNormal () const
 Returns the normal of the plane that constrains movement, enforced if the plane constraint is enabled.
const FVector & GetPlaneConstraintOrigin () const
 Get the plane constraint origin. This defines the behavior of snapping a position to the plane, such as by SnapUpdatedComponentToPlane().
void SetPlaneConstraintAxisSetting (EPlaneConstraintAxisSetting NewAxisSetting)
 Set the plane constraint axis setting. Changing this setting will modify the current value of PlaneConstraintNormal.
FVector ConstrainNormalToPlane (FVector Normal) const
 Constrain a normal vector (of unit length) to the plane constraint, if enabled.
EPlaneConstraintAxisSetting GetPlaneConstraintAxisSetting () const
 Get the plane constraint axis setting.
void SetPlaneConstraintEnabled (bool bEnabled)
 Sets whether or not the plane constraint is enabled.
void SetPlaneConstraintFromVectors (FVector Forward, FVector Up)
 Uses the Forward and Up vectors to compute the plane that constrains movement, enforced if the plane constraint is enabled.
void SetPlaneConstraintNormal (FVector PlaneNormal)
 Sets the normal of the plane that constrains movement, enforced if the plane constraint is enabled. Changing the normal automatically sets PlaneConstraintAxisSetting to "Custom".
void SetPlaneConstraintOrigin (FVector PlaneOrigin)
 Sets the origin of the plane that constrains movement, enforced if the plane constraint is enabled.
FVector ConstrainLocationToPlane (FVector Location) const
 Constrain a position vector to the plane constraint, if enabled.
void SnapUpdatedComponentToPlane ()
 Snap the updated component to the plane constraint, if enabled.
FVector ConstrainDirectionToPlane (FVector Direction) const
 Constrain a direction vector to the plane constraint, if enabled. See: SetPlaneConstraint.
Functions
USceneComponent GetUpdatedComponent () const
 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. See: bAutoRegisterUpdatedComponent, SetUpdatedComponent(), UpdatedPrimitive.
bool GetbUpdateOnlyIfRendered () const
 If true, skips TickComponent() if UpdatedComponent was not recently rendered.
void SetbUpdateOnlyIfRendered (bool Value)
 If true, skips TickComponent() if UpdatedComponent was not recently rendered.
bool GetbAutoUpdateTickRegistration () const
 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.
void SetbAutoUpdateTickRegistration (bool Value)
 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.
bool GetbTickBeforeOwner () const
 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.
void SetbTickBeforeOwner (bool Value)
 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.
bool GetbAutoRegisterUpdatedComponent () const
 If true, registers the owner's Root component as the UpdatedComponent if there is not one currently assigned.
void SetbAutoRegisterUpdatedComponent (bool Value)
 If true, registers the owner's Root component as the UpdatedComponent if there is not one currently assigned.
bool GetbConstrainToPlane () const
 If true, movement will be constrained to a plane. See: PlaneConstraintNormal, PlaneConstraintOrigin, PlaneConstraintAxisSetting.
void SetbConstrainToPlane (bool Value)
 If true, movement will be constrained to a plane. See: PlaneConstraintNormal, PlaneConstraintOrigin, PlaneConstraintAxisSetting.
bool GetbSnapToPlaneAtStart () const
 If true and plane constraints are enabled, then the updated component will be snapped to the plane when first attached.
void SetbSnapToPlaneAtStart (bool Value)
 If true and plane constraints are enabled, then the updated component will be snapped to the plane when first attached.
bool GetbAutoRegisterPhysicsVolumeUpdates () const
 If true, then applies the value of bComponentShouldUpdatePhysicsVolume to the UpdatedComponent. If false, will not change bShouldUpdatePhysicsVolume on the UpdatedComponent at all. See: bComponentShouldUpdatePhysicsVolume.
void SetbAutoRegisterPhysicsVolumeUpdates (bool Value)
 If true, then applies the value of bComponentShouldUpdatePhysicsVolume to the UpdatedComponent. If false, will not change bShouldUpdatePhysicsVolume on the UpdatedComponent at all. See: bComponentShouldUpdatePhysicsVolume.
bool GetbComponentShouldUpdatePhysicsVolume () const
 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.
void SetbComponentShouldUpdatePhysicsVolume (bool Value)
 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.
Public Member Functions inherited from UActorComponent
void Tick (float32 DeltaSeconds)
 Event called every frame if tick is enabled.
EComponentCreationMethod GetComponentCreationMethod () const
void SetbIsEditorOnly (bool Value)
void EndPlay (EEndPlayReason EndPlayReason)
 Blueprint implementable event for when the component ends play, generally via destruction or its Actor's EndPlay.
void BeginPlay ()
 Blueprint implementable event for when the component is beginning play, called before its owning actor's BeginPlay or when the component is dynamically created if the Actor has already BegunPlay.
void MarkRenderStateDirty ()
bool HasBegunPlay () const
void SetbTickInEditor (bool Value)
bool IsVisualizationComponent () const
void SetIsVisualizationComponent (bool Value)
void AsyncPhysicsTick (float32 DeltaSeconds, float32 SimSeconds)
 Event called every async physics tick if bAsyncPhysicsTickEnabled is true.
bool GetbReplicateUsingRegisteredSubObjectList () const
 When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.
void SetbReplicateUsingRegisteredSubObjectList (bool Value)
 When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.
bool GetbReplicates () const
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
void SetbReplicates (bool Value)
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
bool GetbAutoActivate () const
 Whether the component is activated at creation or must be explicitly activated.
void SetbAutoActivate (bool Value)
 Whether the component is activated at creation or must be explicitly activated.
void SetbEditableWhenInherited (bool Value)
 True if this component can be modified when it was inherited from a parent actor class.
void SetbCanEverAffectNavigation (bool Value)
 Whether this component can potentially influence navigation.
bool GetbIsEditorOnly () const
 If true, the component will be excluded from non-editor builds.
bool IsBeingDestroyed () const
 Returns whether the component is in the process of being destroyed.
void SetIsReplicated (bool ShouldReplicate)
 Enable or disable replication. This is the equivalent of RemoteRole for actors (only a bool is required for components).
void DestroyComponent (UObject Object)
 Unregister and mark for pending kill a component. This may not be used to destroy a component that is owned by an actor unless the owning actor is calling the function.
bool ComponentHasTag (FName Tag) const
 See if this component contains the supplied tag.
AActor GetOwner () const
 Follow the Outer chain to get the AActor that 'Owns' this component.
void SetAutoActivate (bool bNewAutoActivate)
 Sets whether the component should be auto activate or not. Only safe during construction scripts.
bool IsActive () const
 Returns whether the component is active or not.
void ToggleActive ()
 Toggles the active state of the component.
void SetActive (bool bNewActive, bool bReset=false)
 Sets whether the component is active or not.
void Activate (bool bReset=false)
 Activates the SceneComponent, should be overridden by native child classes.
void Deactivate ()
 Deactivates the SceneComponent.
float32 GetComponentTickInterval () const
 Returns the tick interval for this component's primary tick function, which is the frequency in seconds at which it will be executed.
void AddTickPrerequisiteActor (AActor PrerequisiteActor)
 Make this component tick after PrerequisiteActor.
void AddTickPrerequisiteComponent (UActorComponent PrerequisiteComponent)
 Make this component tick after PrerequisiteComponent.
void RemoveTickPrerequisiteComponent (UActorComponent PrerequisiteComponent)
 Remove tick dependency on PrerequisiteComponent.
void SetTickableWhenPaused (bool bTickableWhenPaused)
 Sets whether this component can tick when paused.
bool IsComponentTickEnabled () const
 Returns whether this component has tick enabled or not.
void SetTickGroup (ETickingGroup NewTickGroup)
 Changes the ticking group for this component.
void RemoveTickPrerequisiteActor (AActor PrerequisiteActor)
 Remove tick dependency on PrerequisiteActor.
void SetComponentTickIntervalAndCooldown (float32 TickInterval)
 Sets the tick interval for this component's primary tick function. Does not enable the tick interval. Takes effect imediately.
void SetComponentTickInterval (float32 TickInterval)
 Sets the tick interval for this component's primary tick function. Does not enable the tick interval. Takes effect on next tick.
void SetComponentTickEnabled (bool bEnabled)
 Set this component's tick functions to be enabled or disabled. Only has an effect if the function is registered.
Public Member Functions inherited from UObject
bool MarkPackageDirty () const
void RemoveFromRoot ()
bool GetIsRooted () const
bool IsTransient () const
bool Modify (bool bAlwaysMarkDirty=true)
void SetTransactional (bool bTransactional)
bool IsSupportedForNetworking () const
UClass GetClass () const
UObject GetOuter () const
UObject GetTypedOuter (TSubclassOf< UObject > Target) const
 Traverses the outer chain searching for the next object of a certain type.
UPackage GetOutermost () const
UPackage GetPackage () const
void AddToRoot ()
UWorld GetWorld () const
FName GetName () const
FString GetFullName (const UObject StopOuter=nullptr) const
FString GetPathName (const UObject StopOuter=nullptr) const
bool IsA (const UClass Class) const
 Returns true if this object is of the specified type, or a child of that type.
void SaveConfig ()
void LoadConfig ()
void ReloadConfig ()
void CopyScriptPropertiesFrom (const UObject OtherObject)
void opCast (?&Address) const
FString ToString () const

Static Public Member Functions

Static Functions
static UMovementComponent Get (const AActor Actor, FName WithName=NAME_None)
static UMovementComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static UMovementComponent Create (AActor Actor, FName WithName=NAME_None)
static UClass StaticClass ()
Static Public Member Functions inherited from UActorComponent
static UActorComponent Get (const AActor Actor, FName WithName=NAME_None)
static UActorComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static UActorComponent Create (AActor Actor, FName WithName=NAME_None)
static UClass StaticClass ()
Static Public Member Functions inherited from UObject
static UClass StaticClass ()

Public Attributes

MovementComponent
USceneComponent UpdatedComponent
 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. @see bAutoRegisterUpdatedComponent, SetUpdatedComponent(), UpdatedPrimitive.
bool bAutoUpdateTickRegistration
 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.
bool bTickBeforeOwner
 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.
bool bComponentShouldUpdatePhysicsVolume
 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.
bool bAutoRegisterUpdatedComponent
 If true, registers the owner's Root component as the UpdatedComponent if there is not one currently assigned.
bool bAutoRegisterPhysicsVolumeUpdates
 If true, then applies the value of bComponentShouldUpdatePhysicsVolume to the UpdatedComponent. If false, will not change bShouldUpdatePhysicsVolume on the UpdatedComponent at all. @see bComponentShouldUpdatePhysicsVolume.
bool bUpdateOnlyIfRendered
 If true, skips TickComponent() if UpdatedComponent was not recently rendered.
UPrimitiveComponent UpdatedPrimitive
 UpdatedComponent, cast as a UPrimitiveComponent. May be invalid if UpdatedComponent was null or not a UPrimitiveComponent.
PlanarMovement
bool bSnapToPlaneAtStart
 If true and plane constraints are enabled, then the updated component will be snapped to the plane when first attached.
FVector PlaneConstraintNormal
 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. @see bConstrainToPlane, SetPlaneConstraintNormal(), SetPlaneConstraintFromVectors().
bool bConstrainToPlane
 If true, movement will be constrained to a plane. @see PlaneConstraintNormal, PlaneConstraintOrigin, PlaneConstraintAxisSetting.
FVector PlaneConstraintOrigin
 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(). @see bConstrainToPlane, SetPlaneConstraintOrigin().
EPlaneConstraintAxisSetting PlaneConstraintAxisSetting
 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. @see SetPlaneConstraintAxisSetting.
Velocity
FVector Velocity
 Current velocity of updated component.
Public Attributes inherited from UActorComponent
bool bAutoActivate
 Whether the component is activated at creation or must be explicitly activated.
TArray< TObjectPtr< UAssetUserData > > AssetUserData
 Array of user data stored with the component.
TArray< TObjectPtr< UAssetUserData > > AssetUserDataEditorOnly
 Array of user data stored with the component.
bool bReplicates
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
FActorComponentTickFunction PrimaryComponentTick
 Main tick function for the Component.
bool bIsEditorOnly
 If true, the component will be excluded from non-editor builds.
bool bReplicateUsingRegisteredSubObjectList
 When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.
TArray< FName > ComponentTags
 Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.
const EComponentCreationMethod ComponentCreationMethod
const AActor Owner
 Follow the Outer chain to get the AActor that 'Owns' this component.
FActorComponentDeactivateSignature OnComponentDeactivated
 Called when the component has been deactivated.
FActorComponentActivatedSignature OnComponentActivated
 Called when the component has been activated, with parameter indicating if it was from a reset.
float32 ComponentTickInterval
 Returns the tick interval for this component's primary tick function, which is the frequency in seconds at which it will be executed.
Public Attributes inherited from UObject
const UClass Class
const UObject Outer
const UPackage Outermost
const UPackage Package
const UWorld World
const FName Name
const bool IsRooted

Components|Movement

const APhysicsVolume PhysicsVolume
 Returns the PhysicsVolume this MovementComponent is using, or the world's default physics volume if none. *.
const float32 GravityZ
 Returns gravity that affects this component.
const float32 MaxSpeed
 Returns maximum speed of component in current movement mode.
bool MoveUpdatedComponent (FVector Delta, FRotator NewRotation, FHitResult &OutHit, bool bSweep=true, bool bTeleport=false)
 Moves our UpdatedComponent by the given Delta, and sets rotation to NewRotation. Respects the plane constraint, if enabled.
bool IsExceedingMaxSpeed (float32 MaxSpeed) const
 Returns true if the current velocity is exceeding the given max speed (usually the result of GetMaxSpeed()), within a small error tolerance. Note that under normal circumstances updates cause by acceleration will not cause this to be true, however external forces or changes in the max speed limit can cause the max speed to be violated.
void StopMovementImmediately ()
 Stops movement immediately (zeroes velocity, usually zeros acceleration for components with acceleration).
float32 GetGravityZ () const
 Returns gravity that affects this component.
float32 GetMaxSpeed () const
 Returns maximum speed of component in current movement mode.
APhysicsVolume GetPhysicsVolume () const
 Returns the PhysicsVolume this MovementComponent is using, or the world's default physics volume if none. *.
void SetUpdatedComponent (USceneComponent NewUpdatedComponent)
 Assign the component we move and update.

Detailed Description

MovementComponent is an abstract component class that defines functionality for moving a PrimitiveComponent (our UpdatedComponent) each tick. Base functionality includes:

  • Restricting movement to a plane or axis.
  • Utility functions for special handling of collision results (SlideAlongSurface(), ComputeSlideVector(), TwoWallAdjust()).
  • Utility functions for moving when there may be initial penetration (SafeMoveUpdatedComponent(), ResolvePenetration()).
  • Automatically registering the component tick and finding a component to move on the owning Actor. Normally the root component of the owning actor is moved, however another component may be selected (see SetUpdatedComponent()). During swept (non-teleporting) movement only collision of UpdatedComponent is considered, attached components will teleport to the end location ignoring collision.

Member Function Documentation

◆ ConstrainDirectionToPlane()

FVector ConstrainDirectionToPlane ( FVector Direction) const

Constrain a direction vector to the plane constraint, if enabled. See: SetPlaneConstraint.

◆ ConstrainLocationToPlane()

FVector ConstrainLocationToPlane ( FVector Location) const

Constrain a position vector to the plane constraint, if enabled.

◆ ConstrainNormalToPlane()

FVector ConstrainNormalToPlane ( FVector Normal) const

Constrain a normal vector (of unit length) to the plane constraint, if enabled.

◆ Create()

UMovementComponent Create ( AActor Actor,
FName WithName = NAME_None )
static

◆ Get()

UMovementComponent Get ( const AActor Actor,
FName WithName = NAME_None )
static

◆ GetbAutoRegisterPhysicsVolumeUpdates()

bool GetbAutoRegisterPhysicsVolumeUpdates ( ) const

If true, then applies the value of bComponentShouldUpdatePhysicsVolume to the UpdatedComponent. If false, will not change bShouldUpdatePhysicsVolume on the UpdatedComponent at all. See: bComponentShouldUpdatePhysicsVolume.

◆ GetbAutoRegisterUpdatedComponent()

bool GetbAutoRegisterUpdatedComponent ( ) const

If true, registers the owner's Root component as the UpdatedComponent if there is not one currently assigned.

◆ GetbAutoUpdateTickRegistration()

bool GetbAutoUpdateTickRegistration ( ) const

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.

◆ GetbComponentShouldUpdatePhysicsVolume()

bool GetbComponentShouldUpdatePhysicsVolume ( ) const

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.

◆ GetbConstrainToPlane()

bool GetbConstrainToPlane ( ) const

If true, movement will be constrained to a plane. See: PlaneConstraintNormal, PlaneConstraintOrigin, PlaneConstraintAxisSetting.

◆ GetbSnapToPlaneAtStart()

bool GetbSnapToPlaneAtStart ( ) const

If true and plane constraints are enabled, then the updated component will be snapped to the plane when first attached.

◆ GetbTickBeforeOwner()

bool GetbTickBeforeOwner ( ) const

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.

◆ GetbUpdateOnlyIfRendered()

bool GetbUpdateOnlyIfRendered ( ) const

If true, skips TickComponent() if UpdatedComponent was not recently rendered.

◆ GetGravityZ()

float32 GetGravityZ ( ) const

Returns gravity that affects this component.

◆ GetMaxSpeed()

float32 GetMaxSpeed ( ) const

Returns maximum speed of component in current movement mode.

◆ GetOrCreate()

UMovementComponent GetOrCreate ( AActor Actor,
FName WithName = NAME_None )
static

◆ GetPhysicsVolume()

APhysicsVolume GetPhysicsVolume ( ) const

Returns the PhysicsVolume this MovementComponent is using, or the world's default physics volume if none. *.

◆ GetPlaneConstraintAxisSetting()

EPlaneConstraintAxisSetting GetPlaneConstraintAxisSetting ( ) const

Get the plane constraint axis setting.

◆ GetPlaneConstraintNormal()

const FVector & GetPlaneConstraintNormal ( ) const

Returns the normal of the plane that constrains movement, enforced if the plane constraint is enabled.

◆ GetPlaneConstraintOrigin()

const FVector & GetPlaneConstraintOrigin ( ) const

Get the plane constraint origin. This defines the behavior of snapping a position to the plane, such as by SnapUpdatedComponentToPlane().

Returns
The origin of the plane that constrains movement, if the plane constraint is enabled.

◆ GetUpdatedComponent()

USceneComponent GetUpdatedComponent ( ) const

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. See: bAutoRegisterUpdatedComponent, SetUpdatedComponent(), UpdatedPrimitive.

◆ IsExceedingMaxSpeed()

bool IsExceedingMaxSpeed ( float32 MaxSpeed) const

Returns true if the current velocity is exceeding the given max speed (usually the result of GetMaxSpeed()), within a small error tolerance. Note that under normal circumstances updates cause by acceleration will not cause this to be true, however external forces or changes in the max speed limit can cause the max speed to be violated.

◆ MoveUpdatedComponent()

bool MoveUpdatedComponent ( FVector Delta,
FRotator NewRotation,
FHitResult & OutHit,
bool bSweep = true,
bool bTeleport = false )

Moves our UpdatedComponent by the given Delta, and sets rotation to NewRotation. Respects the plane constraint, if enabled.

Returns
True if some movement occurred, false if no movement occurred. Result of any impact will be stored in OutHit.

◆ SetbAutoRegisterPhysicsVolumeUpdates()

void SetbAutoRegisterPhysicsVolumeUpdates ( bool Value)

If true, then applies the value of bComponentShouldUpdatePhysicsVolume to the UpdatedComponent. If false, will not change bShouldUpdatePhysicsVolume on the UpdatedComponent at all. See: bComponentShouldUpdatePhysicsVolume.

◆ SetbAutoRegisterUpdatedComponent()

void SetbAutoRegisterUpdatedComponent ( bool Value)

If true, registers the owner's Root component as the UpdatedComponent if there is not one currently assigned.

◆ SetbAutoUpdateTickRegistration()

void SetbAutoUpdateTickRegistration ( bool Value)

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.

◆ SetbComponentShouldUpdatePhysicsVolume()

void SetbComponentShouldUpdatePhysicsVolume ( bool Value)

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.

◆ SetbConstrainToPlane()

void SetbConstrainToPlane ( bool Value)

If true, movement will be constrained to a plane. See: PlaneConstraintNormal, PlaneConstraintOrigin, PlaneConstraintAxisSetting.

◆ SetbSnapToPlaneAtStart()

void SetbSnapToPlaneAtStart ( bool Value)

If true and plane constraints are enabled, then the updated component will be snapped to the plane when first attached.

◆ SetbTickBeforeOwner()

void SetbTickBeforeOwner ( bool Value)

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.

◆ SetbUpdateOnlyIfRendered()

void SetbUpdateOnlyIfRendered ( bool Value)

If true, skips TickComponent() if UpdatedComponent was not recently rendered.

◆ SetPlaneConstraintAxisSetting()

void SetPlaneConstraintAxisSetting ( EPlaneConstraintAxisSetting NewAxisSetting)

Set the plane constraint axis setting. Changing this setting will modify the current value of PlaneConstraintNormal.

Parameters
NewAxisSettingNew plane constraint axis setting.

◆ SetPlaneConstraintEnabled()

void SetPlaneConstraintEnabled ( bool bEnabled)

Sets whether or not the plane constraint is enabled.

◆ SetPlaneConstraintFromVectors()

void SetPlaneConstraintFromVectors ( FVector Forward,
FVector Up )

Uses the Forward and Up vectors to compute the plane that constrains movement, enforced if the plane constraint is enabled.

◆ SetPlaneConstraintNormal()

void SetPlaneConstraintNormal ( FVector PlaneNormal)

Sets the normal of the plane that constrains movement, enforced if the plane constraint is enabled. Changing the normal automatically sets PlaneConstraintAxisSetting to "Custom".

Parameters
PlaneNormalThe normal of the plane. If non-zero in length, it will be normalized.

◆ SetPlaneConstraintOrigin()

void SetPlaneConstraintOrigin ( FVector PlaneOrigin)

Sets the origin of the plane that constrains movement, enforced if the plane constraint is enabled.

◆ SetUpdatedComponent()

void SetUpdatedComponent ( USceneComponent NewUpdatedComponent)

Assign the component we move and update.

◆ SnapUpdatedComponentToPlane()

void SnapUpdatedComponentToPlane ( )

Snap the updated component to the plane constraint, if enabled.

◆ StaticClass()

UClass StaticClass ( )
static

◆ StopMovementImmediately()

void StopMovementImmediately ( )

Stops movement immediately (zeroes velocity, usually zeros acceleration for components with acceleration).

Member Data Documentation

◆ bAutoRegisterPhysicsVolumeUpdates

bool bAutoRegisterPhysicsVolumeUpdates

If true, then applies the value of bComponentShouldUpdatePhysicsVolume to the UpdatedComponent. If false, will not change bShouldUpdatePhysicsVolume on the UpdatedComponent at all. @see bComponentShouldUpdatePhysicsVolume.

◆ bAutoRegisterUpdatedComponent

bool bAutoRegisterUpdatedComponent

If true, registers the owner's Root component as the UpdatedComponent if there is not one currently assigned.

◆ bAutoUpdateTickRegistration

bool bAutoUpdateTickRegistration

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.

◆ bComponentShouldUpdatePhysicsVolume

bool bComponentShouldUpdatePhysicsVolume

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.

◆ bConstrainToPlane

bool bConstrainToPlane

If true, movement will be constrained to a plane. @see PlaneConstraintNormal, PlaneConstraintOrigin, PlaneConstraintAxisSetting.

◆ bSnapToPlaneAtStart

bool bSnapToPlaneAtStart

If true and plane constraints are enabled, then the updated component will be snapped to the plane when first attached.

◆ bTickBeforeOwner

bool bTickBeforeOwner

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.

◆ bUpdateOnlyIfRendered

bool bUpdateOnlyIfRendered

If true, skips TickComponent() if UpdatedComponent was not recently rendered.

◆ GravityZ

const float32 GravityZ

Returns gravity that affects this component.

◆ MaxSpeed

const float32 MaxSpeed

Returns maximum speed of component in current movement mode.

◆ PhysicsVolume

const APhysicsVolume PhysicsVolume

Returns the PhysicsVolume this MovementComponent is using, or the world's default physics volume if none. *.

◆ PlaneConstraintAxisSetting

EPlaneConstraintAxisSetting PlaneConstraintAxisSetting

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. @see SetPlaneConstraintAxisSetting.

◆ PlaneConstraintNormal

FVector PlaneConstraintNormal

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. @see bConstrainToPlane, SetPlaneConstraintNormal(), SetPlaneConstraintFromVectors().

◆ PlaneConstraintOrigin

FVector PlaneConstraintOrigin

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(). @see bConstrainToPlane, SetPlaneConstraintOrigin().

◆ UpdatedComponent

USceneComponent UpdatedComponent

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. @see bAutoRegisterUpdatedComponent, SetUpdatedComponent(), UpdatedPrimitive.

◆ UpdatedPrimitive

UPrimitiveComponent UpdatedPrimitive

UpdatedComponent, cast as a UPrimitiveComponent. May be invalid if UpdatedComponent was null or not a UPrimitiveComponent.

◆ Velocity

FVector Velocity

Current velocity of updated component.