UPhysicsHandleComponent

Utility object for moving physics objects around.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/PhysicsEngine/PhysicsHandleComponent.h

Include

#include "PhysicsEngine/PhysicsHandleComponent.h"

Syntax

class UPhysicsHandleComponent : public UActorComponent

Remarks

Utility object for moving physics objects around.

Variables

Name Description

Public variable

float

 

AngularDamping

Angular damping of the handle spring

Public variable

float

 

AngularStiffness

Angular stiffness of the handle spring

Public variable

uint32: 1

 

bInterpolateTarget

Public variable

uint32: 1

 

bRotationConstrained

Are we currently constraining the rotation of the grabbed object.

Public variable

uint32: 1

 

bSoftAngularConstraint

Public variable

uint32: 1

 

bSoftLinearConstraint

Public variable

FTransform

 

CurrentTransform

Current transform

Public variable

FName

 

GrabbedBoneName

Name of bone, if we are grabbing a skeletal component

Public variable

UPrimitiveCompo...

 

GrabbedComponent

Component we are currently holding

Protected variable

physx::PxD6Join...

 

HandleData

Pointer to PhysX joint used by the handle

Public variable

float

 

InterpolationSpeed

How quickly we interpolate the physics target transform

Protected variable

physx::PxRigidD...

 

KinActorData

Pointer to kinematic actor jointed to grabbed object

Public variable

float

 

LinearDamping

Linear damping of the handle spring.

Public variable

float

 

LinearStiffness

Linear stiffness of the handle spring

Public variable

FTransform

 

TargetTransform

Target transform

Constructors

Name Description

Public function

UPhysicsHandleComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

UPrimitiveCo...

 

GetGrabbedComponent()

Returns the currently grabbed component, or null if nothing is grabbed.

Public function Const

void

 

GetTargetLocationAndRotation

(
    FVector& TargetLocation,
    FRotator& TargetRotation
)

Get the current location and rotation

Public function

void

 

GrabComponentAtLocation

(
    UPrimitiveComponent* Component,
    FName InBoneName,
    FVector GrabLocation
)

Grab the specified component at a given location.

Public function

void

 

GrabComponentAtLocationWithRotation

(
    UPrimitiveComponent* Component,
    FName InBoneName,
    FVector Location,
    FRotator Rotation
)

Grab the specified component at a given location and rotation. Constrains rotation.

Protected function Virtual

void

 

GrabComponentImp

(
    UPrimitiveComponent* Component,
    FName InBoneName,
    const FVector& Location,
    const FRotator& Rotation,
    bool bRotationConstrained
)

Public function Virtual

void

 

ReleaseComponent()

Release the currently held component

Public function

void

 

SetAngularDamping

(
    float NewAngularDamping
)

Set angular damping

Public function

void

 

SetAngularStiffness

(
    float NewAngularStiffness
)

Set angular stiffness

Public function

void

 

SetInterpolationSpeed

(
    float NewInterpolationSpeed
)

Set interpolation speed

Public function

void

 

SetLinearDamping

(
    float NewLinearDamping
)

Set linear damping

Public function

void

 

SetLinearStiffness

(
    float NewLinearStiffness
)

Set linear stiffness

Public function

void

 

SetTargetLocation

(
    FVector NewLocation
)

Set the target location

Public function

void

 

SetTargetLocationAndRotation

(
    FVector NewLocation,
    FRotator NewRotation
)

Set target location and rotation

Public function

void

 

SetTargetRotation

(
    FRotator NewRotation
)

Set the target rotation

Protected function Virtual

void

 

UpdateDriveSettings()

Update the underlying constraint drive settings from the params in this component

Protected function

void

 

UpdateHandleTransform

(
    const FTransform& NewTransform
)

Move the kinematic handle to the specified

Overridden from UActorComponent

Name Description

Protected function Virtual

void

 

OnUnregister()

Called when a component is unregistered.

Protected function Virtual

void

 

TickComponent

(
    float DeltaTime,
    enum ELevelTick TickType,
    FActorComponentTickFunction* T...
)

Function called every frame on this ActorComponent.

Deprecated Functions

Name Description

Public function Virtual

void

 

GrabComponent

(
    UPrimitiveComponent* Component,
    FName InBoneName,
    FVector GrabLocation,
    bool bConstrainRotation
)

Please use GrabComponentAtLocation or GrabComponentAtLocationWithRotation

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback