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

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[edit]

Property group 'ActorRotator'[edit]

ActorRotationOffset[edit]

Type: Object.Rotator

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

ActorRotatorClass[edit]

Type: class<ActorRotator>


Default value: Class'Legend.ActorRotator'

bBounceHeight[edit]

Type: bool

NextHeight flips from MaxHeight to MinHeight. Never in between.

bBounceRadius[edit]

Type: bool

NextRadius flips from MaxHeight to MinHeight. Never in between.

bBounceRotationRate[edit]

Type: bool

NextRotationRate flips from MaxHeight to MinHeight. Never in between.

bFaceIn[edit]

Type: bool


bFaceOut[edit]

Type: bool


bLongDistance[edit]

Type: bool


bUpdateActorRotation[edit]

Type: bool


Default value: True

HeightShiftRate[edit]

Type: float

How fast we change our height.

MaxHeight[edit]

Type: float

Relative to rotation.

MaxRadius[edit]

Type: float


MaxRotationRate[edit]

Type: float


MinHeight[edit]

Type: float


MinRadius[edit]

Type: float

Distance from origin.

MinRotationRate[edit]

Type: float

Used to calculate roll.

RadiusShiftRate[edit]

Type: float

How fast we change our radius.

RotationShiftRate[edit]

Type: float

How fast we change our rotation rate.

Internal variables[edit]

ActorOrigins[edit]

Type: Object.Vector

Array size: 256


CurrentHeight[edit]

Type: float


CurrentRadius[edit]

Type: float


CurrentRotationRate[edit]

Type: float


FRoll[edit]

Type: float


MyActor[edit]

Type: Actor


MyActors[edit]

Type: Actor

Array size: 256


NextHeight[edit]

Type: float


NextRadius[edit]

Type: float


NextRotationRate[edit]

Type: float


Default values[edit]

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

Functions[edit]

Native functions[edit]

CalcNextHeight[edit]

native(1016) final function CalcNextHeight ()


CalcNextRadius[edit]

native(1014) final function CalcNextRadius ()


CalcNextRotationRate[edit]

native(1015) final function CalcNextRotationRate ()


Update[edit]

native(1010) final function Update (float DeltaTime)


UpdateHeight[edit]

native(1013) final function UpdateHeight (float DeltaTime)


UpdateRadius[edit]

native(1011) final function UpdateRadius (float DeltaTime)


UpdateRotationRate[edit]

native(1012) final function UpdateRotationRate (float DeltaTime)


Events[edit]

BeginPlay[edit]

simulated event BeginPlay ()

Overrides: Actor.BeginPlay


Other instance functions[edit]

Copy[edit]

simulated function Copy (ActorRotator Template)


GetActor[edit]

simulated function GetActor ()


Initialize[edit]

simulated function Initialize ()