My program doesn't have bugs. It just develops random features.

UE3:Actor (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> Actor

Contents

Package: 
Engine
Known classes within Actor:
NavigationHandle
Direct subclasses:
Brush, Camera, CameraActor, Controller, CrowdAgent, CrowdAgentBase, CrowdAttractor, CrowdReplicationActor, DecalActorBase, DecalManager, DroppedPickup, DynamicSMActor, Emitter, EmitterPool, FluidInfluenceActor, FluidSurfaceActor, FracturedStaticMeshActor, FractureManager, GameCrowdInteractionPoint, GameCrowdReplicationActor, GameExplosionActor, HUD, Info, Inventory, InventoryManager, KAsset, Keypoint, LensFlareSource, Light, MaterialInstanceActor, MatineeActor, NavigationPoint, NavMeshObstacle, Note, NxForceField, ParticleEventManager, Pawn, PhysAnimTestActor, PhysXDestructiblePart, PrefabInstance, Projectile, PylonSeed, RadialBlurActor, RigidBodyBase, SceneCaptureActor, SkeletalMeshActor, SpeedTreeActor, SplineActor, StaticMeshActorBase, StaticMeshActorBasedOnExtremeContent, Trigger, UTAvoidMarker, UTCarriedObject, UTGib, UTJumpBootEffect, UTLinkBeamLight, UTVehicleBoostPad, UTWeaponAttachment, UTWeaponShield, VehicleMovementEffect, GameCrowdPopulationManager
This class in other games:
RTNP, U1, UT, U2, U2XMP, UE2Runtime, UT2003, UT2004, UT3

Actor: The base class of all actors. Actor is the base class of all gameplay objects. A large number of properties, behaviors and interfaces are implemented in Actor, including:

- Display - Animation - Physics and world interaction - Making sounds - Networking properties - Actor creation and destruction - Actor iterator functions - Message broadcasting

Constants

List of extra trace flags:

TRACEFLAG_Bullet

Value: 1


TRACEFLAG_PhysicsVolumes

Value: 2

Return if a PhysicsVolume is hit.

TRACEFLAG_SkipMovers

Value: 4

Skip all Movers.

TRACEFLAG_Blocking

Value: 8


REP_RBLOCATION_ERROR_TOLERANCE_SQ

Value: 16.0f

when bReplicateRigidBodyLocation is true, the root body of a ragdoll will be replicated but this is not entirely accurate (and isn't meant to be) as the other bodies in the ragdoll may interfere this can then result in jittering from the client constantly trying to apply the replicated value so if the client's error is less than this amount from the replicated value, it will be ignored.

MINFLOORZ

Value: 0.7

Minimum z value for floor normal (if less, not a walkable floor).

ACTORMAXSTEPHEIGHT

Value: 35.0

Max height floor walking actor can step up to.

RBSTATE_LINVELSCALE

Value: 10.0


RBSTATE_ANGVELSCALE

Value: 1000.0


RB_None

Value: 0x00

Not set, empty.

RB_NeedsUpdate

Value: 0x01

If bNewData & RB_NeedsUpdate != 0 then an update is needed.

RB_Sleeping

Value: 0x02

if bNewData & RB_Sleeping != 0 then this RigidBody needs to sleep.

Properties

Property group 'Advanced'

bConsiderAllStaticMeshComponentsForStreaming

Type: bool

If true, texture streaming code iterates over all StaticMeshComponents found on this actor when building texture streaming information.

bEdShouldSnap

Type: bool

Snap to grid in editor.

bHiddenEd

Type: bool

Modifiers: const

Is hidden within the editor at its startup.

bHiddenEdGroup

Type: bool

Modifiers: const

Is hidden by the group browser.

bLockLocation

Type: bool

Prevent the actor from being moved in the editor.

TickFrequencyAtEndDistance

Type: float

When the actor is TickFrequencyDecreaseDistanceEnd from the player, tick at this frequency (in seconds, bigger is less frequent ticks). If this is 0, no decrease in frequency will occur.

Property group 'Attachment'

Base

Type: Actor

Modifiers: const

Actor we're standing on.

BaseBoneName

Type: name


BaseSkelComponent

Type: SkeletalMeshComponent


bHardAttach

Type: bool

Modifiers: const


bIgnoreBaseRotation

Type: bool


bShadowParented

Type: bool

If TRUE, BaseSkelComponent is used as the shadow parent for this actor.

Property group 'Collision'

bCanStepUpOn

Type: bool

If TRUE, PHYS_Walking will attempt to step up onto this object when it hits it.

Default value: True

bCollideComplex

Type: bool

Ignore Simple Collision on Static Meshes, and collide per Poly.

BlockRigidBody

Type: bool

Modifiers: const, transient

mirrored copy of CollisionComponent's BlockRigidBody for the Actor property window for LDs (so it's next to CollisionType) purely for editing convenience and not used at all by the physics code.

bNoEncroachCheck

Type: bool

For encroachers, don't do the overlap check when they move. You will not get touch events for this actor moving, but it is much faster. So if you want touch events from volumes or triggers you need to set this to be FALSE. This is an optimisation for large numbers of PHYS_RigidBody actors for example.

bPathColliding

Type: bool

this actor should collide (if bWorldGeometry && bBlockActors is true) during path building (ignored if bStatic is true, as actor will always collide during path building).

bPhysRigidBodyOutOfWorldCheck

Type: bool

If true, do a zero-extent trace each frame from old to new Location when in PHYS_RigidBody. If it hits the world (ie might be tunneling), call FellOutOfWorld.

CollisionComponent

Type: PrimitiveComponent

Modifiers: editconst


CollisionType

Type: ECollisionType

Modifiers: const, transient

enum for LDs to select collision options - sets Actor flags and that of our CollisionComponent via PostEditChange().

Default value: COLLIDE_NoCollision

Property group 'Debug'

bDebug

Type: bool


Property group 'Display'

bHidden

Type: bool

Modifiers: const

If this is True, all PrimitiveComponents of the actor are hidden. If this is false, only PrimitiveComponents with HiddenGame=True are hidden.

DrawScale

Type: float

Modifiers: const, interp

Scaling factor, 1.0=normal size.

Default value: 1.0

DrawScale3D

Type: Object.Vector

Modifiers: const, interp

Scaling vector, (1.0,1.0,1.0)=normal size.

Default value:

Member Value
X 1.0
Y 1.0
Z 1.0

PrePivot

Type: Object.Vector

Modifiers: const

Offset from box center for drawing.

Property group 'Movement'

Location

Type: Object.Vector

Modifiers: const

Actor's location; use Move or SetLocation to change.

Physics

Type: EPhysics

Modifiers: const


Rotation

Type: Object.Rotator

Modifiers: const

The actor's rotation; use SetRotation to change.

RotationRate

Type: Object.Rotator

Change in rotation per second.

Property group 'Navigation'

bBlocksNavigation

Type: bool

indicates that this Actor can dynamically block AI paths.

Property group 'Object'

Group

Type: name


Tag

Type: name

Actor's tag name.

Property group 'Physics'

bAllowFluidSurfaceInteraction

Type: bool

Whether this actor will interact with fluid surfaces or not.

Default value: True

Internal variables

See Actor internal variables.

Enums

See Actor enums.

Structs

See Actor structs.

Functions

Static native functions

BP2Vect

native static final function Object.Vector BP2Vect (BasedPosition BP) const

This will take the BasedPosition passed and return a Vector for it.

DrawDebugBox

native static final function DrawDebugBox (Object.Vector Center, Object.Vector Extent, byte R, byte G, byte B, optional bool bPersistentLines) const

Draw a debug box.

Note: This is slow. Use for debugging only.

DrawDebugCone

native static final function DrawDebugCone (Object.Vector Origin, Object.Vector Direction, float Length, float AngleWidth, float AngleHeight, int NumSides, Object.Color DrawColor, optional bool bPersistentLines) const

Draw a debug cone.

Note: This is slow. Use for debugging only.

DrawDebugCoordinateSystem

native static final function DrawDebugCoordinateSystem (Object.Vector AxisLoc, Object.Rotator AxisRot, float Scale, optional bool bPersistentLines) const

Draw Debug coordinate system.

Note: This is slow. Use for debugging only.

DrawDebugCylinder

native static final function DrawDebugCylinder (Object.Vector Start, Object.Vector End, float Radius, int Segments, byte R, byte G, byte B, optional bool bPersistentLines) const

Draw a debug cylinder.

Note: This is slow. Use for debugging only.

DrawDebugLine

native static final function DrawDebugLine (Object.Vector LineStart, Object.Vector LineEnd, byte R, byte G, byte B, optional bool bPersistentLines) const

Draw a debug line.

Note: This is slow. Use for debugging only.

DrawDebugPoint

native static final function DrawDebugPoint (Object.Vector Position, float Size, Object.LinearColor PointColor, optional bool bPersistentLines) const

Draw a debug point.

Note: This is slow. Use for debugging only.

DrawDebugSphere

native static final function DrawDebugSphere (Object.Vector Center, float Radius, int Segments, byte R, byte G, byte B, optional bool bPersistentLines) const

Draw a debug sphere.

Note: This is slow. Use for debugging only.

DrawDebugStar

native static final function DrawDebugStar (Object.Vector Position, float Size, byte R, byte G, byte B, optional bool bPersistentLines) const

Draw a debug box.

Note: This is slow. Use for debugging only.

DrawDebugString

native static final function DrawDebugString (Object.Vector TextLocation, coerce string Text, optional Actor TestBaseActor, optional Object.Color TextColor, optional float Duration) const

Draw Debug string in the world.

Note: This is slow. Use for debugging only.

Parameters:

  • TextLocation - location the string should be drawn (NOTE: if base actor is non-null this will be treated as an offset from that actor)
  • Text - text to draw
  • TestBaseActor - optional) - actor the string should be attached to (none if it should be static)
  • Color - optional) - the color of the text to draw
  • Duration - optional) - the duration the text should stick around; defauls to forever

FlushDebugStrings

native static final function FlushDebugStrings () const

Clear all debug strings.

FlushPersistentDebugLines

native static final function FlushPersistentDebugLines () const

Flush persistent lines.

GetBasedPosition

native static final function Object.Vector GetBasedPosition (BasedPosition BP) const

This will take the BasedPosition passed and return a Vector for it.

GetPackageGuid

native static final function Object.Guid GetPackageGuid (name PackageName)

Looks up the GUID of a package on disk. The package must NOT be in the autodownload cache. This may require loading the header of the package in question and is therefore slow.

SetBasedPosition

native static final function SetBasedPosition (out BasedPosition BP, Object.Vector Pos, optional Actor ForcedBase) const

This will calculate and then set the passed in BasedPosition. This is just modifying the passed in BasedPosition.

Vect2BP

native static final function Vect2BP (out BasedPosition BP, Object.Vector Pos, optional Actor ForcedBase) const

This will calculate and then set the passed in BasedPosition. This is just modifying the passed in BasedPosition.

Other static functions

GetLocalString

static function string GetLocalString (optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2)


ReplaceText

static function ReplaceText (out string Text, string Replace, string With)


Iterator functions

AllActors

native(304) final iterator function AllActors (class<ActorBaseClass, out Actor Actor, optional class<InterfaceInterfaceClass)

Iterates over all actors in the world, returning all that subclass the specified base class and optionally implement the specified interface.

Note: This is slow. Use one of the more specific iterators whenever possible.

AllOwnedComponents

native final iterator function AllOwnedComponents (class<ComponentBaseClass, out ActorComponent OutComponent)

Iterates over all components directly or indirectly attached to this actor.

Parameters:

  • BaseClass - Only components deriving from BaseClass will be iterated upon.
  • OutComponent - The iteration variable.

BasedActors

native(306) final iterator function BasedActors (class<ActorBaseClass, out Actor Actor)

Iterates over all actors Attached to this actor, that subclass the specified base class. (very fast)

ChildActors

native(305) final iterator function ChildActors (class<ActorBaseClass, out Actor Actor)

Iterates over this actor's Children, that subclass the specified base class. (very fast)

CollidingActors

native(321) final iterator function CollidingActors (class<ActorBaseClass, out Actor Actor, float Radius, optional Object.Vector Loc, optional bool bUseOverlapCheck, optional class<InterfaceInterfaceClass)

Iterates over all colliding actors (bCollideActors) within the specified radius around the specified location, that subclass the specified base class and optionally implement the specified interface. The location defaults to the calling actor's location, for example:

foreach someActor.CollidingActors(class'X', X, 100) {
  // colliding X within 100 UU radius of someActor
}

If the overlap check is used, actors are picked if their collision overlaps the specified radius, otherwise the actor's location must be within the radius.

Note: This iterator uses the collision hash to find actors. That means, for smaller radii it is much faster than AllActors().

ComponentList

native final iterator function ComponentList (class<ActorComponentBaseClass, out ActorComponent out_Component)

Iterates over this actor's Components, returning those that subclass the specified base class.

DynamicActors

native(313) final iterator function DynamicActors (class<ActorBaseClass, out Actor Actor, optional class<InterfaceInterfaceClass)

Iterates over all non-static actors in the world, returning all that subclass the specified base class.

Note: This is somewhat faster than AllActors because it skips the static actors. But while it only starts at the first non-static actor, it usually still is slower than many other iterators because it needs to iterate over the entire remaining actors list.

LocalPlayerControllers

native final iterator function LocalPlayerControllers (class<PlayerControllerBaseClass, out PlayerController PC)

Iterates over all local PlayerControllers subclassing the specified base class. (very fast)

Typically there is one local PlayerController on each client and listen server and in offline play, but in splitscreen mode there is one PlayerController for each screen. There are no local PlayerControllers on a dedicated server. On servers there may be many PlayerControllers that are no local PlayerControllers. Those will not be returned by this iterator.

OverlappingActors

native final iterator function OverlappingActors (class<ActorBaseClass, out Actor out_Actor, float Radius, optional Object.Vector Loc, optional bool bIgnoreHidden)

Returns colliding actor (bCollideActors==true) which overlap a sphere from location 'Loc' and 'Radius' radius. Like CollidingActors this uses the collision hash so it is fast for smaller radii.

Parameters:

  • BaseClass - The Actor returns must be a subclass of this.
  • out_Actor - returned Actor at each iteration.
  • Radius - Radius of sphere for overlapping check.
  • Loc - Center of sphere for overlapping check. (Optional, caller's location is used otherwise).
  • bIgnoreHidden - if true, ignore bHidden actors.

TouchingActors

native(307) final iterator function TouchingActors (class<ActorBaseClass, out Actor Actor)

Iterates over all Touching actors subclassing the specified base class.

TraceActors

native(309) final iterator function TraceActors (class<ActorBaseClass, out Actor Actor, out Object.Vector HitLoc, out Object.Vector HitNorm, Object.Vector End, optional Object.Vector Start, optional Object.Vector Extent, optional out TraceHitInfo HitInfo, optional int ExtraTraceFlags)

Performs a trace and iterates over all actors on the checked line. The actors are ordered by distance of their hit location.

VisibleActors

native(311) final iterator function VisibleActors (class<ActorBaseClass, out Actor Actor, optional float Radius, optional Object.Vector Loc)

Iterates over all non-hidden actors visible from the specified location, that subclass the specified base class and optionally are located within a certain radius.

Note: This is extremely slow as it iterates the entire actor list and additionally performs a trace on every actor from the list that matches class and radius requirements.

VisibleCollidingActors

native(312) final iterator function VisibleCollidingActors (class<ActorBaseClass, out Actor Actor, float Radius, optional Object.Vector Loc, optional bool bIgnoreHidden, optional Object.Vector Extent, optional bool bTraceActors, optional class<InterfaceInterfaceClass)

Iterates over all colliding actors (bCollideActors) within the specified radius around the specified location, that subclass the specified base class, are visible from the location and optionally implement the specified interface.

Parameters:

  • BaseClass - Only actors subclassing this class are returned.
  • Actor - The actors are returned through this variable.
  • Radius - Only actors that are located within this radius are returned.
  • Loc - The center from which to check. Defaults to the calling actor's location.
  • bIgnoreHidden - If true, bHidden actors are skipped.
  • Extent - Zero vector to perform a line check, non-zero vector to perform a "thick" trace. Traces are always performed from Loc to the location of the actor.
  • bTraceActors - Whether trace for other actors as well, not just for world geometry. Enabling this option makes the check a bit more expensive.
  • InterfaceClass - If specified, only actors implementing this interface are returned.

Latent functions

FinishAnim

native(261) final latent function FinishAnim (AnimNodeSequence SeqNode)

Returns when the animation in the specified node sequence has finished.

Sleep

native(256) final latent function Sleep (float Seconds)

Returns after the specified amount of game time has passed.

Native functions

See Actor native functions.

Events

See Actor events.

Other instance functions

See Actor instance functions.