I love the smell of UnrealEd crashing in the morning. – tarquin

UE3:PrimitiveComponent native functions (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> Component >> ActorComponent >> PrimitiveComponent (native functions)
PrimitiveComponent native functions in other games:
UT3
Other member categories for this class:
properties

Native functions

AddForce

native final function AddForce (Object.Vector Force, optional Object.Vector Position, optional name BoneName)

Add a force to this component.

This is like a thruster. Good for adding a burst over some (non zero) time.

Parameters:

  • Force - Force vector to apply. Magnitude indicates strength of force.
  • Position - Position on object to apply force. If (0,0,0), force is applied at center of mass.
  • BoneName - Used in the skeletal case to apply a force to a single body.

AddImpulse

native final function AddImpulse (Object.Vector Impulse, optional Object.Vector Position, optional name BoneName, optional bool bVelChange)

Add an impulse to the physics of this PrimitiveComponent.

Good for zero time. One time insta burst.

Parameters:

  • Impulse - Magnitude and direction of impulse to apply.
  • Position - Point in world space to apply impulse at. If Position is (0,0,0), impulse is applied at center of mass ie. no rotation.
  • BoneName - If a SkeletalMeshComponent, name of bone to apply impulse to.
  • bVelChange - If true, the Strength is taken as a change in velocity instead of an impulse (ie. mass will have no affect).

AddRadialForce

native final function AddRadialForce (Object.Vector Origin, float Radius, float Strength, ERadialImpulseFalloff Falloff)

Add a force originating from the supplied world-space location.

Parameters:

  • Origin - Origin of force in world space.
  • Radius - Radius within which to apply the force.
  • Strength - Strength of force to apply.
  • Falloff - Allows you to control the strength of the force as a function of distance from Origin.

AddRadialImpulse

native final function AddRadialImpulse (Object.Vector Origin, float Radius, float Strength, ERadialImpulseFalloff Falloff, optional bool bVelChange)

Add an impulse to this component, radiating out from the specified position. In the case of a skeletal mesh, may affect each bone of the mesh.

Parameters:

  • Origin - Point of origin for the radial impulse blast
  • Radius - Size of radial impulse. Beyond this distance from Origin, there will be no affect.
  • Strength - Maximum strength of impulse applied to body.
  • Falloff - Allows you to control the strength of the impulse as a function of distance from Origin.
  • bVelChange - If true, the Strength is taken as a change in velocity instead of an impulse (ie. mass will have no affect).

AddTorque

native final function AddTorque (Object.Vector Torque, optional name BoneName)

Add a torque to this component.

Parameters:

  • Torque - Force vector to apply. Magnitude indicates strength of force.
  • BoneName - Used in the skeletal case to apply a force to a single body.

ClosestPointOnComponentToComponent

native function GJKResult ClosestPointOnComponentToComponent (out PrimitiveComponent OtherComponent, out Object.Vector PointOnComponentA, out Object.Vector PointOnComponentB)

Calculates the closest point this component to another component

Parameters:

  • PrimitiveComponent - Another Primitive Component
  • PointOnComponentA - Point on this primitive closest to other primitive
  • PointOnComponentB - Point on other primitive closest to this primitive

Returns:

An enumeration indicating the result of the query (intersection/non-intersection/failure)

ClosestPointOnComponentToPoint

native final function GJKResult ClosestPointOnComponentToPoint (out Object.Vector POI, out Object.Vector Extent, out Object.Vector OutPointA, out Object.Vector OutPointB)

Calculates the closest point on this primitive to a point given

Parameters:

  • POI - Point in world space to determine closest point to
  • Extent - Convex primitive
  • OutPointA - The point closest on the extent box
  • OutPointB - Point on this primitive closest to the extent box

Returns:

An enumeration indicating the result of the query (intersection/non-intersection/failure)

GetRootBodyInstance

native final function RB_BodyInstance GetRootBodyInstance ()

returns the physics RB_BodyInstance for the root body of this component (if any)

GetRotation

final native function Object.Rotator GetRotation ()

Returns rotation of the component, in world space.

InitRBPhys

native final function InitRBPhys ()

initializes rigid body physics for this component this is done automatically for PrimitiveComponents attached via Actor defaults, but if a component is attached at runtime you may need to call this function to set it up

Note: this function does nothing if not attached or bDisableAllRigidBody is set

PutRigidBodyToSleep

native final function PutRigidBodyToSleep (optional name BoneName)

Put a simulation back to sleep.

RetardRBLinearVelocity

native final function RetardRBLinearVelocity (Object.Vector RetardDir, float VelScale)

Reduce velocity of rigid body physics in the direction supplied. This decomposes body velocity into that along supplied vector and that perpendicular to the vector. That along vector, if in same direction as vector, is scale by VelScale. If it is moving in the opposite direction to supplied vector it is not affected.

Parameters:

  • RetardDir - Unit vector indicating direction to check velocity of physics against
  • VelScale - Value from 0.0 to 1.0 - 1.0 will stop all motion along RetardDir

RigidBodyIsAwake

native final function bool RigidBodyIsAwake (optional name BoneName)

Returns if the body is currently awake and simulating. If a SkeletalMeshComponent, and no BoneName is specified, will pick a random bone - so does not make much sense if not all bones are jointed together.

SetAbsolute

native function SetAbsolute (optional bool NewAbsoluteTranslation, optional bool NewAbsoluteRotation, optional bool NewAbsoluteScale)


SetActorCollision

native final function SetActorCollision (bool NewCollideActors, bool NewBlockActors, optional bool NewAlwaysCheckCollision)


SetBlockRigidBody

native final function SetBlockRigidBody (bool bNewBlockRigidBody)

Change the value of BlockRigidBody.

Parameters:

  • NewBlockRigidBody - The value to assign to BlockRigidBody.

SetCullDistance

native final function SetCullDistance (float NewCullDistance)

Changes the value of CullDistance.

Parameters:

  • NewCullDistance - The value to assign to CullDistance.

SetDepthPriorityGroup

native final function SetDepthPriorityGroup (Scene.ESceneDepthPriorityGroup NewDepthPriorityGroup)

Changes the value of DepthPriorityGroup.

Parameters:

  • NewDepthPriorityGroup - The value to assign to DepthPriorityGroup.

SetHidden

native final function SetHidden (bool NewHidden)

Changes the value of HiddenGame.

Parameters:

  • NewHidden - The value to assign to HiddenGame.

SetIgnoreOwnerHidden

native final function SetIgnoreOwnerHidden (bool bNewIgnoreOwnerHidden)

Changes the value of bIgnoreOwnerHidden.

SetLightEnvironment

native final function SetLightEnvironment (LightEnvironmentComponent NewLightEnvironment)

Changes the value of LightEnvironment.

Parameters:

  • NewLightEnvironment - The value to assign to LightEnvironment.

SetLightingChannels

native final function SetLightingChannels (LightComponent.LightingChannelContainer NewLightingChannels)

Changes the value of LightingChannels.

Parameters:

  • NewLightingChannels - The value to assign to LightingChannels.

SetNotifyRigidBodyCollision

native final function SetNotifyRigidBodyCollision (bool bNewNotifyRigidBodyCollision)

Changes the value of bNotifyRigidBodyCollision

Parameters:

  • bNewNotifyRigidBodyCollision - The value to assign to bNotifyRigidBodyCollision

SetOnlyOwnerSee

native final function SetOnlyOwnerSee (bool bNewOnlyOwnerSee)

Changes the value of bOnlyOwnerSee.

SetOwnerNoSee

native final function SetOwnerNoSee (bool bNewOwnerNoSee)

Changes the value of bOwnerNoSee.

SetPhysMaterialOverride

native final function SetPhysMaterialOverride (PhysicalMaterial NewPhysMaterial)

Changes the current PhysMaterialOverride for this component. Note that if physics is already running on this component, this will _not_ alter its mass/inertia etc, it will only change its surface properties like friction and the damping.

SetRBAngularVelocity

native final function SetRBAngularVelocity (Object.Vector NewAngVel, optional bool bAddToCurrent)

Set the angular velocity of the rigid body physics of this PrimitiveComponent. If no rigid-body physics is active, will do nothing. In the case of a SkeletalMeshComponent will affect all bones - and will apply the linear velocity necessary to get all bones to rotate around the root. This should be used cautiously - it may be better to use AddForce or AddImpulse.

Parameters:

  • NewAngVel - New angular velocity to apply to physics.
  • bAddToCurrent - If true, NewAngVel is added to the existing velocity of the body.

SetRBChannel

final native function SetRBChannel (ERBCollisionChannel Channel)

Changes the rigid-body channel that this object is defined in.

SetRBCollidesWithChannel

final native function SetRBCollidesWithChannel (ERBCollisionChannel Channel, bool bNewCollides)

Changes a member of the RBCollideWithChannels container for this PrimitiveComponent.

Parameters:

  • bNewCollides - whether or not to collide with passed in channel

SetRBCollisionChannels

final native function SetRBCollisionChannels (RBCollisionChannelContainer Channels)

Sets the collision channels based on the settings in the Channel container.

Parameters:

  • Channels - is a list of channels with which the component should collide

SetRBDominanceGroup

native final function SetRBDominanceGroup (byte InDomGroup)

Used for creating one-way physics interactions.

See: RBDominanceGroup

SetRBLinearVelocity

native final function SetRBLinearVelocity (Object.Vector NewVel, optional bool bAddToCurrent)

Set the linear velocity of the rigid body physics of this PrimitiveComponent. If no rigid-body physics is active, will do nothing. In the case of a SkeletalMeshComponent will affect all bones. This should be used cautiously - it may be better to use AddForce or AddImpulse.

Parameters:

  • NewVel - New linear velocity to apply to physics.
  • bAddToCurrent - If true, NewVel is added to the existing velocity of the body.

SetRBPosition

native final function SetRBPosition (Object.Vector NewPos, optional name BoneName)

Called if you want to move the physics of a component which has dynamics running (ie actor is in PHYS_RigidBody). Be careful calling this when this is jointed to something else, or when it does not fit in the destination (no checking is done).

Parameters:

  • NewPos - new position of the body
  • BoneName - SkeletalMeshComponent only) if specified, the bone to change position of if not specified for a SkeletalMeshComponent, all bodies are moved by the delta between the desired location and that of the root body.

SetRBRotation

native final function SetRBRotation (Object.Rotator NewRot, optional name BoneName)

Called if you want to rotate the physics of a component which has dynamics running (ie actor is in PHYS_RigidBody).

Parameters:

  • NewRot - new rotation of the body
  • BoneName - SkeletalMeshComponent only) if specified, the bone to change rotation of if not specified for a SkeletalMeshComponent, all bodies are moved by the delta between the desired rotation and that of the root body.

SetRotation

native function SetRotation (Object.Rotator NewRotation)


SetScale

native function SetScale (float NewScale)


SetScale3D

native function SetScale3D (Object.Vector NewScale3D)


SetShadowParent

native final function SetShadowParent (PrimitiveComponent NewShadowParent)

Changes the value of ShadowParent.

Parameters:

  • NewShadowParent - The value to assign to ShadowParent.

SetTraceBlocking

native final function SetTraceBlocking (bool NewBlockZeroExtent, bool NewBlockNonZeroExtent)


SetTranslation

native function SetTranslation (Object.Vector NewTranslation)


SetViewOwnerDepthPriorityGroup

native final function SetViewOwnerDepthPriorityGroup (bool bNewUseViewOwnerDepthPriorityGroup, Scene.ESceneDepthPriorityGroup NewViewOwnerDepthPriorityGroup)

Changes the value of bUseViewOwnerDepthPriorityGroup and ViewOwnerDepthPriorityGroup.

Parameters:

  • bNewUseViewOwnerDepthPriorityGroup - The value to assign to bUseViewOwnerDepthPriorityGroup.
  • NewViewOwnerDepthPriorityGroup - The value to assign to ViewOwnerDepthPriorityGroup.

WakeRigidBody

native final function WakeRigidBody (optional name BoneName)

Ensure simulation is running for this component. If a SkeletalMeshComponent and no BoneName is specified, will wake all bones in the PhysicsAsset.