Mostly Harmless

UE2:ActorRotator (U2XMP)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
U2XMP Object >> Actor >> ActorRotator
Package: 
Legend

ActorRotator.uc $Author: Mfox $ $Date: 4/30/02 12:22p $ $Revision: 3 $

Description: Used to rotate any actor or set of actors in a given level using the specified parameters. How to use this class (from UnrealEd):

Place in level.
Link to desired Actors in level via Tag and Event.

(Set Event on the ActorRotator, and match the Tag on the desired Actors

with that Event.)

Set parameters as desired.

- Radius, RotationRate and Height are self explanitory.

- ShiftRates are how fast the above variables change. At any given moment, an ActorRotator has a Current and Next version of the above variables. The current version of the variable is changed at the rate defined by its respective ShiftRate until it reaches its respective Next version of the variable. Once it reaches this Next version of the variable, a new Next version of the variable is calculated. This continues indefinately. - Set bUpdateActorRotation to false if you would rather have the Actor(s) be responsible for updating their own rotation. Example: Attaching a ParticleSprayer whose physics are set to PHYS_Rotating. - ActorRotationOffset is used to correctly align a model so it appears to always be facing forward. This is only used when bUpdateActorRotation is set to True. Example: You want to use a bird mesh, but when you see it in the game, it is always facing out from the center instead of in the direction it is moving. In this case you would simply set ActorRotationOffset.Yaw to 90 degrees. - Note of interest: If you set MinRotationRate to a negative number, the Actor(s) will eventually slow down and change rotation direction. When the rotation direction changes the Actor will also be flipped to maintain correct orientation. This is only done when bUpdateActorRotation is set to True. - Important note: ActorRotators will not rotate Actors whose Tag matches its own tag. This prevents ActorRotators from rotating themselves and any other ActorRotators it creates in the process. This is only relevant for ActorRotators whose Tag matches its own Event. - Use bLongDistance if you are going to use a lot of these in a level. This will only use a single ActorRotator to rotate all the attached Actors. This means that they will all be perfectly in sync with each other, but still totally random within the restraints of the set parameters. The attached Actor(s) will be rotated about their initial location rather than the location of the ActorRotator itself.

How to use this class (from UnrealScript):

Spawn.
Set MyActor;
Set desired parameters as described above.
Call Initialize();

Properties

Property group 'ActorRotator'

ActorRotationOffset

Type: Object.Rotator

Offset from default. -- Default: X-axis is in alignment with velocity of the actor.

ActorRotatorClass

Type: class<ActorRotator>


Default value: Class'Legend.ActorRotator'

bBounceHeight

Type: bool

NextHeight flips from MaxHeight to MinHeight. Never in between.

bBounceRadius

Type: bool

NextRadius flips from MaxHeight to MinHeight. Never in between.

bBounceRotationRate

Type: bool

NextRotationRate flips from MaxHeight to MinHeight. Never in between.

bFaceIn

Type: bool


bFaceOut

Type: bool


bLongDistance

Type: bool


bUpdateActorRotation

Type: bool


Default value: True

HeightShiftRate

Type: float

How fast we change our height.

MaxHeight

Type: float

Relative to rotation.

MaxRadius

Type: float


MaxRotationRate

Type: float


MinHeight

Type: float


MinRadius

Type: float

Distance from origin.

MinRotationRate

Type: float

Used to calculate roll.

RadiusShiftRate

Type: float

How fast we change our radius.

RotationShiftRate

Type: float

How fast we change our rotation rate.

Internal variables

ActorOrigins

Type: Object.Vector

Array size: 256


CurrentHeight

Type: float


CurrentRadius

Type: float


CurrentRotationRate

Type: float


FRoll

Type: float


MyActor

Type: Actor


MyActors

Type: Actor

Array size: 256


NextHeight

Type: float


NextRadius

Type: float


NextRotationRate

Type: float


Default values

Property Value
bDirectional True
bMustFace False
RemoteRole ROLE_None
RenderIteratorClass Class'Legend.ActorRotatorRI'
VisibilityHeight 5000.0
VisibilityRadius 5000.0

Functions

Native functions

CalcNextHeight

native(1016) final function CalcNextHeight ()


CalcNextRadius

native(1014) final function CalcNextRadius ()


CalcNextRotationRate

native(1015) final function CalcNextRotationRate ()


Update

native(1010) final function Update (float DeltaTime)


UpdateHeight

native(1013) final function UpdateHeight (float DeltaTime)


UpdateRadius

native(1011) final function UpdateRadius (float DeltaTime)


UpdateRotationRate

native(1012) final function UpdateRotationRate (float DeltaTime)


Events

BeginPlay

simulated event BeginPlay ()

Overrides: Actor.BeginPlay


Other instance functions

Copy

simulated function Copy (ActorRotator Template)


GetActor

simulated function GetActor ()


Initialize

simulated function Initialize ()