Worst-case scenario: the UEd Goblin wipes the map and burns down your house.

UE3:RB_BodyInstance (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> RB_BodyInstance
Package: 
Engine
This class in other games:
UDK

Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.

Properties[edit]

Property group 'BoneSpring'[edit]

bDisableOnOverextension[edit]

Type: bool

If true, bone spring will automatically disable if it ever gets longer than the OverextensionThreshold.

bEnableBoneSpringAngular[edit]

Type: bool

Enable angular 'spring' between the physics body for this bone, and the world-space location of the animation bone.

bEnableBoneSpringLinear[edit]

Type: bool

Enable linear 'spring' between the physics body for this bone, and the world-space location of the animation bone.

bMakeSpringToBaseCollisionComponent[edit]

Type: bool

When using bone springs, connect them to the physics body of the Base's CollisionComponent. When using this option, SetBoneSpringTarget must be given a matrix for this bone relative to the other bone, rather than relative to the world.

BoneAngularDamping[edit]

Type: float

Damping on angular spring to animated bone.

Default value: 0.1

BoneAngularSpring[edit]

Type: float

Strength of angular spring to animated bone.

Default value: 1.0

BoneLinearDamping[edit]

Type: float

Damping on linear spring to animated bone.

Default value: 0.1

BoneLinearSpring[edit]

Type: float

Strength of linear spring to animated bone.

Default value: 10.0

bTeleportOnOverextension[edit]

Type: bool

This will teleport the whole PhysicsAssetInstance if this spring gets too long, to reduce to error to zero. Note - having this set on more than one body in a PhysicsAssetInstance will have unpredictable results.

bUseKinActorForBoneSpring[edit]

Type: bool

When using bone springs, connect them to a kinematic body and animate that, rather than animating the attachment location on the 'world'. This adds some overhead, but tracks rapidly moving targets better.

OverextensionThreshold[edit]

Type: float

If bDisableOnOverextension is on, the bone spring will be disabled if it stretches more than this amount.

Property group 'Physics'[edit]

bEnableCollisionResponse[edit]

Type: bool

Modifiers: const

Enables physics response for this body (on by default). If FALSE, contacts are still generated and reported. Useful for "sensor" bodies.

Default value: True

bOnlyCollideWithPawns[edit]

Type: bool

Modifiers: const

This body should only collide with other bodies with their components marked bConsiderPawnForRBCollision. Useful for flappy bits you do not want to collide with the world.

bPushBody[edit]

Type: bool

Modifiers: const

Denotes body as a "push" body. Also disables collision response, by definition.

PhysMaterialOverride[edit]

Type: PhysicalMaterial

Modifiers: const

Allows you to override the PhysicalMaterial to use for this body. Due to the way the BodyInstance pooling works, this MUST BE LAST PROPERTY OF THE CLASS.

Property group 'RB_BodyInstance'[edit]

CustomGravityFactor[edit]

Type: float

The force applied to the body to address custom gravity for the actor is multiplied CustomGravityFactor, allowing bodies to individually control how custom gravity settings affectthem

Default value: 1.0

Internal variables[edit]

BodyData[edit]

Type: pointer

Modifiers: native, const

Internal use. Physics-engine representation of this body.

BodyIndex[edit]

Type: int

Modifiers: const

Index of this BodyInstance within the PhysicsAssetInstance/PhysicsAsset.

BoneSpring[edit]

Type: pointer

Modifiers: native, const

Internal use. Physics-engine representation of the spring on this body.

BoneSpringKinActor[edit]

Type: pointer

Modifiers: native, const

If bUseKinActorForBoneSpring is true, this is the Physics-engine representation of the kinematic actor the spring is attached to.

LastEffectPlayedTime[edit]

Type: float

Modifiers: transient

For per-bodyinstance effects this keeps track of the last time one played. Could be used for items like gib effects.

OwnerComponent[edit]

Type: PrimitiveComponent

Modifiers: const, transient

PrimitiveComponent containing this body. Due to the way the BodyInstance pooling works, this MUST BE FIRST PROPERTY OF THE CLASS.

PreviousVelocity[edit]

Type: Object.Vector

Previous frame Velocity of this BodyInstance. Only updated if this is the root body of the CollisionComponent of an Actor in PHYS_RigidBody used for collision events since by the time the event is sent, Velocity would have been updated with the post-collision velocity

SceneIndex[edit]

Type: int

Modifiers: native, const

Physics scene index.

Velocity[edit]

Type: Object.Vector

Current linear velocity of this BodyInstance. Only updated if this is the root body of the CollisionComponent of an Actor in PHYS_RigidBody

Native functions[edit]

EnableBoneSpring[edit]

final native function EnableBoneSpring (bool bInEnableLinear, bool bInEnableAngular, const out Object.Matrix InBoneTarget)

Used to turn the angular/linear bone spring on and off. InBoneTarget is in world space, unless bMakeSpringToBaseCollisionComponent is TRUE, in which case it is relative to that body.

EnableCollisionResponse[edit]

final native function EnableCollisionResponse (bool bEnableResponse)

Enable/disable response to contacts.

GetUnrealWorldAngularVelocity[edit]

final native function Object.Vector GetUnrealWorldAngularVelocity ()

Get current angular velocity in world space from physics body.

GetUnrealWorldTM[edit]

final native function Object.Matrix GetUnrealWorldTM ()

Get current transform in world space from physics body.

GetUnrealWorldVelocity[edit]

final native function Object.Vector GetUnrealWorldVelocity ()

Get current velocity in world space from physics body.

IsFixed[edit]

final native function bool IsFixed ()

Returns TRUE if this body is fixed

IsValidBodyInstance[edit]

final native function bool IsValidBodyInstance ()

See if this body is valid.

SetBlockRigidBody[edit]

final native function SetBlockRigidBody (bool bNewBlockRigidBody)

Used to disable rigid body collisions for this body. Overrides the bNoCollision flag in the BodySetup for this body.

SetBoneSpringParams[edit]

final native function SetBoneSpringParams (float InLinearSpring, float InLinearDamping, float InAngularSpring, float InAngularDamping)

Used to set the spring stiffness and damping parameters for the bone spring.

SetBoneSpringTarget[edit]

final native function SetBoneSpringTarget (const out Object.Matrix InBoneTarget, bool bTeleport)

Used to set desired target location of this spring. Usually called by UpdateRBBonesFromSpaceBases. InBoneTarget is in world space, unless bMakeSpringToBaseCollisionComponent is TRUE, in which case it is relative to that body.

SetFixed[edit]

final native function SetFixed (bool bNewFixed)

Force this body to be fixed (kinematic) or not. Overrides the BodySetup for this body.

SetPhysMaterialOverride[edit]

final native function SetPhysMaterialOverride (PhysicalMaterial NewPhysMaterial)

Set physical material override for this body