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

This is effectively a joint that allows you to connect 2 rigid bodies together. You can create different types of joints using the various parameters of this component. More...

Static Public Member Functions

Static Functions
static UPhysicsConstraintComponent Get (const AActor Actor, FName WithName=NAME_None)
static UPhysicsConstraintComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static UPhysicsConstraintComponent Create (AActor Actor, FName WithName=NAME_None)
static UClass StaticClass ()
Static Public Member Functions inherited from USceneComponent
static USceneComponent Get (const AActor Actor, FName WithName=NAME_None)
static USceneComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static USceneComponent 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

Constraint
AActor ConstraintActor1
 Pointer to first Actor to constrain.
FConstrainComponentPropName ComponentName1
 Name of first component property to constrain. If Actor1 is NULL, will look within Owner. If this is NULL, will use RootComponent of Actor1.
AActor ConstraintActor2
 Pointer to second Actor to constrain.
FConstrainComponentPropName ComponentName2
 Name of second component property to constrain. If Actor2 is NULL, will look within Owner. If this is NULL, will use RootComponent of Actor2.
ConstraintComponent
FConstraintInstance ConstraintInstance
 All constraint settings.
Variables
FConstraintBrokenSignature OnConstraintBroken
 Notification when constraint is broken.
FPlasticDeformationEventSignature OnPlasticDeformation
 Notification when constraint plasticity drive target changes.
Public Attributes inherited from USceneComponent
EDetailMode DetailMode
 If detail mode is >= system detail mode, primitive won't be rendered.
EComponentMobility Mobility
 How often this component is allowed to move, used to make various optimizations. Only safe to set in constructor.
FVector RelativeLocation
 Location of the component relative to its parent.
bool bAbsoluteRotation
 If RelativeRotation should be considered relative to the world, rather than the parent.
bool bAbsoluteLocation
 If RelativeLocation should be considered relative to the world, rather than the parent.
bool bAbsoluteScale
 If RelativeScale3D should be considered relative to the world, rather than the parent.
FRotator RelativeRotation
 Rotation of the component relative to its parent.
FVector RelativeScale3D
 Non-uniform scaling of the component relative to its parent. Note that scaling is always applied in local space (no shearing etc).
FVector WorldLocation
const FBoxSphereBounds Bounds
const USceneComponent AttachParent
 What we are currently attached to. If valid, RelativeLocation etc. are used relative to this object.
FRotator WorldRotation
const FVector ShapeCenter
FQuat ComponentQuat
bool ShouldUpdatePhysicsVolume
 Gets whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved.
const APhysicsVolume PhysicsVolume
 Physics Volume in which this SceneComponent is located *.
const FVector ComponentVelocity
 Velocity of the component. @see GetComponentVelocity().
const FName AttachSocketName
 Optional socket name on AttachParent that we are attached to.
FTransform WorldTransform
const FVector WorldScale
const int NumChildrenComponents
 Gets the number of attached children components.
bool bShouldUpdatePhysicsVolume
 Whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved. @see GetPhysicsVolume().
FPhysicsVolumeChanged PhysicsVolumeChangedDelegate
 Delegate that will be called when PhysicsVolume has been changed *.
bool bUseAttachParentBound
 If true, this component uses its parents bounds when attached. This can be a significant optimization with many components attached together.
bool bVisible
 Whether to completely draw the primitive; if false, the primitive is not drawn, does not cast a shadow.
bool bHiddenInGame
 Whether to hide the primitive in game, if the primitive is Visible.
const FVector ForwardVector
 Get the forward (X) unit direction vector from this component, in world space.
const FVector UpVector
 Get the up (Z) unit direction vector from this component, in world space.
FTransform RelativeTransform
 Returns the transform of the component relative to its parent.
const FVector RightVector
 Get the right (Y) unit direction vector from this component, in world space.
const TArray< FName > AllSocketNames
 Gets the names of all the sockets on the 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

Physics|Components|PhysicsConstraint

const float32 CurrentTwist
 Gets the current Angular Twist of the constraint.
const FConstraintInstanceAccessor Constraint
 Gets the constraint object.
const float32 CurrentSwing1
 Gets the current Swing1 of the constraint.
const float32 CurrentSwing2
 Gets the current Swing2 of the constraint.
void SetConstraintReferenceFrame (EConstraintFrame Frame, FTransform RefFrame)
 Pass in reference frame in. If the constraint is currently active, this will set its active local pose. Otherwise the change will take affect in InitConstraint.
void GetConstrainedComponents (UPrimitiveComponent &OutComponent1, FName &OutBoneName1, UPrimitiveComponent &OutComponent2, FName &OutBoneName2)
 Get connected components and potential related attachement bones.
FConstraintInstanceAccessor GetConstraint ()
 Gets the constraint object.
void GetConstraintForce (FVector &OutLinearForce, FVector &OutAngularForce)
 Retrieve the constraint force most recently applied to maintain this constraint. Returns 0 forces if the constraint is not initialized or broken.
float32 GetCurrentSwing1 () const
 Gets the current Swing1 of the constraint.
float32 GetCurrentSwing2 () const
 Gets the current Swing2 of the constraint.
float32 GetCurrentTwist () const
 Gets the current Angular Twist of the constraint.
bool IsBroken ()
 Retrieve the status of constraint being broken.
bool IsProjectionEnabled () const
 Is projection enabled. See SetProjectionEnabled.
void SetAngularBreakable (bool bAngularBreakable, float32 AngularBreakThreshold)
 Sets the Angular Breakable properties.
void SetAngularDriveMode (EAngularDriveMode DriveMode)
 Switches the angular drive mode between SLERP and Twist And Swing.
void SetAngularDriveParams (float32 PositionStrength, float32 VelocityStrength, float32 InForceLimit)
 Sets the drive params for the angular drive.
void SetAngularOrientationDrive (bool bEnableSwingDrive, bool bEnableTwistDrive)
 Enables/Disables angular orientation drive. Only relevant if the AngularDriveMode is set to Twist and Swing.
void SetAngularOrientationTarget (FRotator InPosTarget)
 Sets the target orientation for the angular drive.
void SetAngularPlasticity (bool bAngularPlasticity, float32 AngularPlasticityThreshold)
 Sets the Angular Plasticity properties.
void SetAngularSwing1Limit (EAngularConstraintMotion MotionType, float32 Swing1LimitAngle)
 Sets the Angular Swing1 Motion Type.
void SetAngularSwing2Limit (EAngularConstraintMotion MotionType, float32 Swing2LimitAngle)
 Sets the Angular Swing2 Motion Type.
void SetAngularTwistLimit (EAngularConstraintMotion ConstraintType, float32 TwistLimitAngle)
 Sets the Angular Twist Motion Type.
void SetAngularVelocityDrive (bool bEnableSwingDrive, bool bEnableTwistDrive)
void SetAngularVelocityDriveSLERP (bool bEnableSLERP)
 Enables/Disables the angular velocity slerp drive. Only relevant if the AngularDriveMode is set to SLERP.
void SetAngularVelocityDriveTwistAndSwing (bool bEnableTwistDrive, bool bEnableSwingDrive)
 Enables/Disables angular velocity twist and swing drive. Only relevant if the AngularDriveMode is set to Twist and Swing.
void SetAngularVelocityTarget (FVector InVelTarget)
 Sets the target velocity for the angular drive.
void SetConstrainedComponents (UPrimitiveComponent Component1, FName BoneName1, UPrimitiveComponent Component2, FName BoneName2)
 Directly specify component to connect. Will update frames based on current position.
void BreakConstraint ()
 Break this constraint.
void SetConstraintReferenceOrientation (EConstraintFrame Frame, FVector PriAxis, FVector SecAxis)
 Pass in reference orientation in (maintains reference position). If the constraint is currently active, this will set its active local pose. Otherwise the change will take affect in InitConstraint.
void SetConstraintReferencePosition (EConstraintFrame Frame, FVector RefPosition)
 Pass in reference position in (maintains reference orientation). If the constraint is currently active, this will set its active local pose. Otherwise the change will take affect in InitConstraint.
void SetContactTransferScale (float32 ContactTransferScale)
 Sets the contact transfer scale properties.
void SetDisableCollision (bool bDisableCollision)
 If true, the collision between the two rigid bodies of the constraint will be disabled.
void SetLinearBreakable (bool bLinearBreakable, float32 LinearBreakThreshold)
 Sets the Linear Breakable properties.
void SetLinearDriveParams (float32 PositionStrength, float32 VelocityStrength, float32 InForceLimit)
 Sets the drive params for the linear drive.
void SetLinearPlasticity (bool bLinearPlasticity, float32 LinearPlasticityThreshold, EConstraintPlasticityType PlasticityType)
 Sets the Linear Plasticity properties.
void SetLinearPositionDrive (bool bEnableDriveX, bool bEnableDriveY, bool bEnableDriveZ)
 Enables/Disables linear position drive.
void SetLinearPositionTarget (FVector InPosTarget)
 Sets the target position for the linear drive.
void SetLinearVelocityDrive (bool bEnableDriveX, bool bEnableDriveY, bool bEnableDriveZ)
 Enables/Disables linear position drive.
void SetLinearVelocityTarget (FVector InVelTarget)
 Sets the target velocity for the linear drive.
void SetLinearXLimit (ELinearConstraintMotion ConstraintType, float32 LimitSize)
 Sets the LinearX Motion Type.
void SetLinearYLimit (ELinearConstraintMotion ConstraintType, float32 LimitSize)
 Sets the LinearY Motion Type.
void SetLinearZLimit (ELinearConstraintMotion ConstraintType, float32 LimitSize)
 Sets the LinearZ Motion Type.
void SetOrientationDriveSLERP (bool bEnableSLERP)
 Enables/Disables the angular orientation slerp drive. Only relevant if the AngularDriveMode is set to SLERP.
void SetOrientationDriveTwistAndSwing (bool bEnableTwistDrive, bool bEnableSwingDrive)
 Enables/Disables angular orientation drive. Only relevant if the AngularDriveMode is set to Twist and Swing.
void SetProjectionEnabled (bool bProjectionEnabled)
 If true, joint projection is enabled. Projection is a semi-physics post-solve correction for fixing small errors, and a teleport for fixing larger errors. See SetProjectionParams.
void SetProjectionParams (float32 ProjectionLinearAlpha, float32 ProjectionAngularAlpha, float32 ProjectionLinearTolerance, float32 ProjectionAngularTolerance)
 Set the projection settings for use when projection is enabled. See SetProjectionEnabled. For ragdolls you usually require that ProjectionLinearAlpha and ProjectionAngularAlpha be zero. They are most useful for cosmetic chains etc. ProjectionLinearTolerance and ProjectionAngularTolerance are emergency error recovery settings and should only rarely affect the simulation. If the simulation is significantly affected by the Tolerance settings, it likely indicates a setup stability issue.

Additional Inherited Members

Public Member Functions inherited from USceneComponent
void SetHiddenInGame (bool NewHidden, bool bPropagateToChildren=false)
 Changes the value of bHiddenInGame, if false this will disable Visibility during gameplay.
void SetRelativeLocation (FVector NewLocation)
bool GetShouldUpdatePhysicsVolume () const
 Gets whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved.
USceneComponent GetChildComponentByClass (TSubclassOf< USceneComponent > ComponentClass)
void GetChildrenComponentsByClass (UClass ComponentClass, bool bIncludeAllDescendants, ?&OutChildren)
bool GetbShouldUpdatePhysicsVolume () const
 Whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved. See: GetPhysicsVolume().
void SetbShouldUpdatePhysicsVolume (bool bInShouldUpdatePhysicsVolume)
 Whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved. See: GetPhysicsVolume().
void AddLocalOffset (FVector DeltaLocation)
void AddLocalRotation (FRotator DeltaRotation)
void AddLocalRotation (FQuat DeltaRotation)
void AddLocalTransform (FTransform DeltaTransform)
void AddRelativeLocation (FVector DeltaLocation)
void AddRelativeRotation (FRotator DeltaRotation)
void AddRelativeRotation (FQuat DeltaRotation)
void AddWorldOffset (FVector DeltaLocation)
void AddWorldRotation (FRotator DeltaRotation)
void AddWorldRotation (FQuat DeltaRotation)
void AddWorldTransform (FTransform DeltaTransform)
void AttachToComponent (USceneComponent Parent, FName SocketName=NAME_None, EAttachmentRule AttachmentRule=EAttachmentRule ::SnapToTarget)
FBoxSphereBounds GetBounds () const
FQuat GetComponentQuat () const
FVector GetRelativeLocation () const
FRotator GetRelativeRotation () const
FVector GetRelativeScale3D () const
FVector GetShapeCenter () const
FQuat GetSocketQuaternion (FName SocketName)
bool IsAttachedTo (const USceneComponent CheckComponent) const
bool IsAttachedTo (const AActor CheckActor) const
void SetbVisualizeComponent (bool bVisualize)
void SetComponentQuat (FQuat NewRotation)
void SetShouldUpdatePhysicsVolume (bool bInShouldUpdatePhysicsVolume)
 Sets whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved.
void SetRelativeLocationAndRotation (FVector NewLocation, FRotator NewRotation)
void SetRelativeLocationAndRotation (FVector NewLocation, FQuat NewRotation)
void SetRelativeRotation (FRotator NewRotation)
void SetRelativeRotation (FQuat NewRotation)
void SetRelativeTransform (FTransform NewTransform)
void SetWorldLocation (FVector NewLocation)
void SetWorldLocationAndRotation (FVector NewLocation, FRotator NewRotation)
void SetWorldLocationAndRotation (FVector NewLocation, FQuat NewRotation)
void SetWorldRotation (FRotator NewRotation)
void SetWorldRotation (FQuat NewRotation)
void SetWorldTransform (FTransform NewTransform)
bool GetbAbsoluteLocation () const
 If RelativeLocation should be considered relative to the world, rather than the parent.
void SetbAbsoluteLocation (bool Value)
 If RelativeLocation should be considered relative to the world, rather than the parent.
bool GetbAbsoluteRotation () const
 If RelativeRotation should be considered relative to the world, rather than the parent.
void SetbAbsoluteRotation (bool Value)
 If RelativeRotation should be considered relative to the world, rather than the parent.
bool GetbAbsoluteScale () const
 If RelativeScale3D should be considered relative to the world, rather than the parent.
void SetbAbsoluteScale (bool Value)
 If RelativeScale3D should be considered relative to the world, rather than the parent.
bool GetbVisible () const
 Whether to completely draw the primitive; if false, the primitive is not drawn, does not cast a shadow.
void SetbVisible (bool Value)
 Whether to completely draw the primitive; if false, the primitive is not drawn, does not cast a shadow.
bool GetbHiddenInGame () const
 Whether to hide the primitive in game, if the primitive is Visible.
void SetbHiddenInGame (bool Value)
 Whether to hide the primitive in game, if the primitive is Visible.
bool GetbUseAttachParentBound () const
 If true, this component uses its parents bounds when attached. This can be a significant optimization with many components attached together.
void SetbUseAttachParentBound (bool Value)
 If true, this component uses its parents bounds when attached. This can be a significant optimization with many components attached together.
const EComponentMobility & GetMobility () const
 How often this component is allowed to move, used to make various optimizations. Only safe to set in constructor.
void GetParentComponents (TArray< USceneComponent > &Parents) const
 Gets all attachment parent components up to and including the root component.
void GetChildrenComponents (bool bIncludeAllDescendants, TArray< USceneComponent > &Children) const
 Gets all components that are attached to this component, possibly recursively.
int GetNumChildrenComponents () const
 Gets the number of attached children components.
USceneComponent GetChildComponent (int ChildIndex) const
 Gets the attached child component at the specified location.
bool IsAnySimulatingPhysics () const
 Returns whether the specified body is currently using physics simulation.
bool IsSimulatingPhysics (FName BoneName=NAME_None) const
 Returns whether the specified body is currently using physics simulation.
APhysicsVolume GetPhysicsVolume () const
 Get the PhysicsVolume overlapping this component.
void SetVisibility (bool bNewVisibility, bool bPropagateToChildren=false)
 Set visibility of the component, if during game use this to turn on/off.
void ToggleVisibility (bool bPropagateToChildren=false)
 Toggle visibility of the component.
bool IsVisible () const
 Returns true if this component is visible in the current context.
TArray< FName > GetAllSocketNames () const
 Gets the names of all the sockets on the component.
USceneComponent GetAttachParent () const
 Get the SceneComponent we are attached to.
FTransform GetRelativeTransform () const
 Returns the transform of the component relative to its parent.
FVector GetRightVector () const
 Get the right (Y) unit direction vector from this component, in world space.
FVector GetForwardVector () const
 Get the forward (X) unit direction vector from this component, in world space.
FName GetAttachSocketName () const
 Get the socket we are attached to.
FVector GetComponentVelocity () const
 Get velocity of the component: either ComponentVelocity, or the velocity of the physics body if simulating physics.
FRotator GetSocketRotation (FName InSocketName) const
 Get world-space socket or bone FRotator rotation.
FTransform GetSocketTransform (FName InSocketName, ERelativeTransformSpace TransformSpace=ERelativeTransformSpace ::RTS_World) const
 Get world-space socket transform.
FVector GetUpVector () const
 Get the up (Z) unit direction vector from this component, in world space.
bool DoesSocketExist (FName InSocketName) const
 Return true if socket with the given name exists.
void DetachFromParent (bool bMaintainWorldPosition=false, bool bCallModify=true)
FVector GetSocketLocation (FName InSocketName) const
 Get world-space socket or bone location.
void AddLocalOffset (FVector DeltaLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the location of the component in its local reference frame.
void AddLocalRotation (FRotator DeltaRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the rotation of the component in its local reference frame.
void AddLocalTransform (FTransform DeltaTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the transform of the component in its local reference frame. Scale is unchanged.
void AddRelativeLocation (FVector DeltaLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the translation of the component relative to its parent.
void AddRelativeRotation (FRotator DeltaRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta the rotation of the component relative to its parent.
void AddWorldOffset (FVector DeltaLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the location of the component in world space.
void AddWorldRotation (FRotator DeltaRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the rotation of the component in world space.
void AddWorldTransform (FTransform DeltaTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the transform of the component in world space. Ignores scale and sets it to (1,1,1).
void AddWorldTransformKeepScale (FTransform DeltaTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the transform of the component in world space. Scale is unchanged.
bool AttachTo (USceneComponent InParent, FName InSocketName=NAME_None, EAttachLocation AttachType=EAttachLocation ::KeepRelativeOffset, bool bWeldSimulatedBodies=true)
bool AttachToComponent (USceneComponent Parent, FName SocketName, EAttachmentRule LocationRule, EAttachmentRule RotationRule, EAttachmentRule ScaleRule, bool bWeldSimulatedBodies)
 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.
void DetachFromComponent (EDetachmentRule LocationRule=EDetachmentRule ::KeepRelative, EDetachmentRule RotationRule=EDetachmentRule ::KeepRelative, EDetachmentRule ScaleRule=EDetachmentRule ::KeepRelative, bool bCallModify=true)
 Detach this component from whatever it is attached to. Automatically unwelds components that are welded together (see AttachToComponent), though note that some effects of welding may not be undone.
FVector GetWorldLocation () const
 Return location of the component, in world space.
FRotator GetWorldRotation () const
 Returns rotation of the component, in world space.
FVector GetWorldScale () const
 Returns scale of the component, in world space.
FTransform GetWorldTransform () const
 Get the current component-to-world transform for this component.
void SetRelativeLocation (FVector NewLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the location of the component relative to its parent.
void SetRelativeLocationAndRotation (FVector NewLocation, FRotator NewRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the location and rotation of the component relative to its parent.
void SetRelativeRotation (FRotator NewRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the rotation of the component relative to its parent.
void SetRelativeTransform (FTransform NewTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the transform of the component relative to its parent.
void SetWorldLocation (FVector NewLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Put this component at the specified location in world space. Updates relative location to achieve the final world location.
void SetWorldLocationAndRotation (FVector NewLocation, FRotator NewRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the relative location and rotation of the component to put it at the supplied pose in world space.
void SetWorldRotation (FRotator NewRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Put this component at the specified rotation in world space. Updates relative rotation to achieve the final world rotation.
void SetWorldTransform (FTransform NewTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the transform of the component in world space.
void ResetRelativeTransform ()
 Reset the transform of the component relative to its parent. Sets relative location to zero, relative rotation to no rotation, and Scale to 1.
void SetAbsolute (bool bNewAbsoluteLocation=false, bool bNewAbsoluteRotation=false, bool bNewAbsoluteScale=false)
 Set which parts of the relative transform should be relative to parent, and which should be relative to world.
void SetWorldScale3D (FVector NewScale)
 Set the relative scale of the component to put it at the supplied scale in world space.
void SetMobility (EComponentMobility NewMobility)
 Set how often this component is allowed to move during runtime. Causes a component re-register if the component is already registered.
void SetRelativeScale3D (FVector NewScale3D)
 Set the non-uniform scale of the component relative to its parent.
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

Detailed Description

This is effectively a joint that allows you to connect 2 rigid bodies together. You can create different types of joints using the various parameters of this component.

Member Function Documentation

◆ BreakConstraint()

void BreakConstraint ( )

Break this constraint.

◆ Create()

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

◆ Get()

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

◆ GetConstrainedComponents()

void GetConstrainedComponents ( UPrimitiveComponent & OutComponent1,
FName & OutBoneName1,
UPrimitiveComponent & OutComponent2,
FName & OutBoneName2 )

Get connected components and potential related attachement bones.

◆ GetConstraint()

FConstraintInstanceAccessor GetConstraint ( )

Gets the constraint object.

◆ GetConstraintForce()

void GetConstraintForce ( FVector & OutLinearForce,
FVector & OutAngularForce )

Retrieve the constraint force most recently applied to maintain this constraint. Returns 0 forces if the constraint is not initialized or broken.

◆ GetCurrentSwing1()

float32 GetCurrentSwing1 ( ) const

Gets the current Swing1 of the constraint.

◆ GetCurrentSwing2()

float32 GetCurrentSwing2 ( ) const

Gets the current Swing2 of the constraint.

◆ GetCurrentTwist()

float32 GetCurrentTwist ( ) const

Gets the current Angular Twist of the constraint.

◆ GetOrCreate()

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

◆ IsBroken()

bool IsBroken ( )

Retrieve the status of constraint being broken.

◆ IsProjectionEnabled()

bool IsProjectionEnabled ( ) const

Is projection enabled. See SetProjectionEnabled.

◆ SetAngularBreakable()

void SetAngularBreakable ( bool bAngularBreakable,
float32 AngularBreakThreshold )

Sets the Angular Breakable properties.

Parameters
bAngularBreakableWhether it is possible to break the joint with angular force
AngularBreakThresholdTorque needed to break the joint

◆ SetAngularDriveMode()

void SetAngularDriveMode ( EAngularDriveMode DriveMode)

Switches the angular drive mode between SLERP and Twist And Swing.

Parameters
DriveModeThe angular drive mode to use. SLERP uses shortest spherical path, but will not work if any angular constraints are locked. Twist and Swing decomposes the path into the different angular degrees of freedom but may experience gimbal lock

◆ SetAngularDriveParams()

void SetAngularDriveParams ( float32 PositionStrength,
float32 VelocityStrength,
float32 InForceLimit )

Sets the drive params for the angular drive.

Parameters
PositionStrengthPositional strength for the drive (stiffness)
VelocityStrengthVelocity strength of the drive (damping)
InForceLimitMax force applied by the drive

◆ SetAngularOrientationDrive()

void SetAngularOrientationDrive ( bool bEnableSwingDrive,
bool bEnableTwistDrive )

Enables/Disables angular orientation drive. Only relevant if the AngularDriveMode is set to Twist and Swing.

Parameters
bEnableSwingDriveIndicates whether the drive for the swing axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing
bEnableTwistDriveIndicates whether the drive for the twist axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing

◆ SetAngularOrientationTarget()

void SetAngularOrientationTarget ( FRotator InPosTarget)

Sets the target orientation for the angular drive.

Parameters
InPosTargetTarget orientation

◆ SetAngularPlasticity()

void SetAngularPlasticity ( bool bAngularPlasticity,
float32 AngularPlasticityThreshold )

Sets the Angular Plasticity properties.

Parameters
bAngularPlasticityWhether it is possible to reset the target angle from the angular displacement
AngularPlasticityThresholdDegrees needed to reset the rest state of the joint

◆ SetAngularSwing1Limit()

void SetAngularSwing1Limit ( EAngularConstraintMotion MotionType,
float32 Swing1LimitAngle )

Sets the Angular Swing1 Motion Type.

Parameters
Swing1LimitAngleSize of limit in degrees

◆ SetAngularSwing2Limit()

void SetAngularSwing2Limit ( EAngularConstraintMotion MotionType,
float32 Swing2LimitAngle )

Sets the Angular Swing2 Motion Type.

Parameters
Swing2LimitAngleSize of limit in degrees

◆ SetAngularTwistLimit()

void SetAngularTwistLimit ( EAngularConstraintMotion ConstraintType,
float32 TwistLimitAngle )

Sets the Angular Twist Motion Type.

Parameters
ConstraintTypeNew Constraint Type
TwistLimitAngleSize of limit in degrees

◆ SetAngularVelocityDrive()

void SetAngularVelocityDrive ( bool bEnableSwingDrive,
bool bEnableTwistDrive )

◆ SetAngularVelocityDriveSLERP()

void SetAngularVelocityDriveSLERP ( bool bEnableSLERP)

Enables/Disables the angular velocity slerp drive. Only relevant if the AngularDriveMode is set to SLERP.

Parameters
bEnableSLERPIndicates whether the SLERP drive should be enabled. Only relevant if the AngularDriveMode is set to SLERP

◆ SetAngularVelocityDriveTwistAndSwing()

void SetAngularVelocityDriveTwistAndSwing ( bool bEnableTwistDrive,
bool bEnableSwingDrive )

Enables/Disables angular velocity twist and swing drive. Only relevant if the AngularDriveMode is set to Twist and Swing.

Parameters
bEnableTwistDriveIndicates whether the drive for the twist axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing
bEnableSwingDriveIndicates whether the drive for the swing axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing

◆ SetAngularVelocityTarget()

void SetAngularVelocityTarget ( FVector InVelTarget)

Sets the target velocity for the angular drive.

Parameters
InVelTargetTarget velocity

◆ SetConstrainedComponents()

void SetConstrainedComponents ( UPrimitiveComponent Component1,
FName BoneName1,
UPrimitiveComponent Component2,
FName BoneName2 )

Directly specify component to connect. Will update frames based on current position.

◆ SetConstraintReferenceFrame()

void SetConstraintReferenceFrame ( EConstraintFrame Frame,
FTransform RefFrame )

Pass in reference frame in. If the constraint is currently active, this will set its active local pose. Otherwise the change will take affect in InitConstraint.

◆ SetConstraintReferenceOrientation()

void SetConstraintReferenceOrientation ( EConstraintFrame Frame,
FVector PriAxis,
FVector SecAxis )

Pass in reference orientation in (maintains reference position). If the constraint is currently active, this will set its active local pose. Otherwise the change will take affect in InitConstraint.

◆ SetConstraintReferencePosition()

void SetConstraintReferencePosition ( EConstraintFrame Frame,
FVector RefPosition )

Pass in reference position in (maintains reference orientation). If the constraint is currently active, this will set its active local pose. Otherwise the change will take affect in InitConstraint.

◆ SetContactTransferScale()

void SetContactTransferScale ( float32 ContactTransferScale)

Sets the contact transfer scale properties.

Parameters
ContactTransferScaleSet the contact transfer scale for the parent of the joint

◆ SetDisableCollision()

void SetDisableCollision ( bool bDisableCollision)

If true, the collision between the two rigid bodies of the constraint will be disabled.

◆ SetLinearBreakable()

void SetLinearBreakable ( bool bLinearBreakable,
float32 LinearBreakThreshold )

Sets the Linear Breakable properties.

Parameters
bLinearBreakableWhether it is possible to break the joint with linear force
LinearBreakThresholdForce needed to break the joint

◆ SetLinearDriveParams()

void SetLinearDriveParams ( float32 PositionStrength,
float32 VelocityStrength,
float32 InForceLimit )

Sets the drive params for the linear drive.

Parameters
PositionStrengthPositional strength for the drive (stiffness)
VelocityStrengthVelocity strength of the drive (damping)
InForceLimitMax force applied by the drive

◆ SetLinearPlasticity()

void SetLinearPlasticity ( bool bLinearPlasticity,
float32 LinearPlasticityThreshold,
EConstraintPlasticityType PlasticityType )

Sets the Linear Plasticity properties.

Parameters
bLinearPlasticityWhether it is possible to reset the target angle from the Linear displacement
LinearPlasticityThresholdPercent deformation needed to reset the rest length of the joint

◆ SetLinearPositionDrive()

void SetLinearPositionDrive ( bool bEnableDriveX,
bool bEnableDriveY,
bool bEnableDriveZ )

Enables/Disables linear position drive.

Parameters
bEnableDriveXIndicates whether the drive for the X-Axis should be enabled
bEnableDriveYIndicates whether the drive for the Y-Axis should be enabled
bEnableDriveZIndicates whether the drive for the Z-Axis should be enabled

◆ SetLinearPositionTarget()

void SetLinearPositionTarget ( FVector InPosTarget)

Sets the target position for the linear drive.

Parameters
InPosTargetTarget position

◆ SetLinearVelocityDrive()

void SetLinearVelocityDrive ( bool bEnableDriveX,
bool bEnableDriveY,
bool bEnableDriveZ )

Enables/Disables linear position drive.

Parameters
bEnableDriveXIndicates whether the drive for the X-Axis should be enabled
bEnableDriveYIndicates whether the drive for the Y-Axis should be enabled
bEnableDriveZIndicates whether the drive for the Z-Axis should be enabled

◆ SetLinearVelocityTarget()

void SetLinearVelocityTarget ( FVector InVelTarget)

Sets the target velocity for the linear drive.

Parameters
InVelTargetTarget velocity

◆ SetLinearXLimit()

void SetLinearXLimit ( ELinearConstraintMotion ConstraintType,
float32 LimitSize )

Sets the LinearX Motion Type.

Parameters
ConstraintTypeNew Constraint Type
LimitSizeSize of limit

◆ SetLinearYLimit()

void SetLinearYLimit ( ELinearConstraintMotion ConstraintType,
float32 LimitSize )

Sets the LinearY Motion Type.

Parameters
ConstraintTypeNew Constraint Type
LimitSizeSize of limit

◆ SetLinearZLimit()

void SetLinearZLimit ( ELinearConstraintMotion ConstraintType,
float32 LimitSize )

Sets the LinearZ Motion Type.

Parameters
ConstraintTypeNew Constraint Type
LimitSizeSize of limit

◆ SetOrientationDriveSLERP()

void SetOrientationDriveSLERP ( bool bEnableSLERP)

Enables/Disables the angular orientation slerp drive. Only relevant if the AngularDriveMode is set to SLERP.

Parameters
bEnableSLERPIndicates whether the SLERP drive should be enabled. Only relevant if the AngularDriveMode is set to SLERP

◆ SetOrientationDriveTwistAndSwing()

void SetOrientationDriveTwistAndSwing ( bool bEnableTwistDrive,
bool bEnableSwingDrive )

Enables/Disables angular orientation drive. Only relevant if the AngularDriveMode is set to Twist and Swing.

Parameters
bEnableTwistDriveIndicates whether the drive for the twist axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing
bEnableSwingDriveIndicates whether the drive for the swing axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing

◆ SetProjectionEnabled()

void SetProjectionEnabled ( bool bProjectionEnabled)

If true, joint projection is enabled. Projection is a semi-physics post-solve correction for fixing small errors, and a teleport for fixing larger errors. See SetProjectionParams.

◆ SetProjectionParams()

void SetProjectionParams ( float32 ProjectionLinearAlpha,
float32 ProjectionAngularAlpha,
float32 ProjectionLinearTolerance,
float32 ProjectionAngularTolerance )

Set the projection settings for use when projection is enabled. See SetProjectionEnabled. For ragdolls you usually require that ProjectionLinearAlpha and ProjectionAngularAlpha be zero. They are most useful for cosmetic chains etc. ProjectionLinearTolerance and ProjectionAngularTolerance are emergency error recovery settings and should only rarely affect the simulation. If the simulation is significantly affected by the Tolerance settings, it likely indicates a setup stability issue.

Parameters
ProjectionLinearAlphaControls the semi-physical correction of linear error remaining after the joint solve. Will add energy into the system. Best for joint chains connected to a kinematic.
ProjectionAngularAlphaControls the semi-physical correction of angular error remaining after the joint solve. Will add energy into the system. Best for joint chains connected to a kinematic.
ProjectionLinearToleranceLinear errors above this will be corrected with a non-physical teleport.
ProjectionAngularToleranceAngular errors above this will be corrected with a non-physical teleport.

◆ StaticClass()

UClass StaticClass ( )
static

Member Data Documentation

◆ ComponentName1

Name of first component property to constrain. If Actor1 is NULL, will look within Owner. If this is NULL, will use RootComponent of Actor1.

◆ ComponentName2

Name of second component property to constrain. If Actor2 is NULL, will look within Owner. If this is NULL, will use RootComponent of Actor2.

◆ Constraint

const FConstraintInstanceAccessor Constraint

Gets the constraint object.

◆ ConstraintActor1

AActor ConstraintActor1

Pointer to first Actor to constrain.

◆ ConstraintActor2

AActor ConstraintActor2

Pointer to second Actor to constrain.

◆ ConstraintInstance

FConstraintInstance ConstraintInstance

All constraint settings.

◆ CurrentSwing1

const float32 CurrentSwing1

Gets the current Swing1 of the constraint.

◆ CurrentSwing2

const float32 CurrentSwing2

Gets the current Swing2 of the constraint.

◆ CurrentTwist

const float32 CurrentTwist

Gets the current Angular Twist of the constraint.

◆ OnConstraintBroken

FConstraintBrokenSignature OnConstraintBroken

Notification when constraint is broken.

◆ OnPlasticDeformation

FPlasticDeformationEventSignature OnPlasticDeformation

Notification when constraint plasticity drive target changes.