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

Legacy:ObjectPath

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 06:42, 22 May 2021 by SeriousBarbie (Talk | contribs) (added details/layout/spell fixes)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UT :: Actor (UT) >> Keypoint (UT) >> ObjectPath (Package: UnrealShare)

Allows an object to follow a defined path, by specifying PathPoint nodes.

Note: At least 4 PathPoints must exist. The first and last do not need speed/deltaU settings. Maximal 35 nodes are possible and because the first and last are dummies, 33 real positions are possible.

Note: If there are N points to interpolate through, there must be in total N+2 points specified. Point 0 and Point N+1 are dummy control points, where Point 1-Point 0 is the initial direction of motion, and Point N+1 - Point N is the final direction of motion. The object will start at point 1 and end up at point N.

Uses the Bernstein basis functions for Bezier interpolation:
B0(u) = (1-u)^3
B1(u) = 3u(1-u)^2
B2(u) = 3u^2(1-u)
B3(u) = u^3

Properties

ObjectPath Group

bool bAlterPitch
Should the pitch of the actor be modified during movement.
bool bAlterYaw
Should the yaw of the actor be modified during movement.
bool bAlterRoll
Should the roll of the actor be modified during movement.
name PathActorTag
The Tag of the actor which should be moved. Only the first found Actor with this tag will be moved.
rotator RAdjust
Adjust the rotation of the object.

Hidden

bool bPlayedOnce
Really don't play it again since it's already finished last time
bool bTriggeredOnce
Don't repeat the path if it's already played through
int curNode
Which node are we at?
vector lastPosition
Where the actor was in the most recent frame
rotator lastRotation
The orientation of the actor in the most recent frame
int numPathNodes
how many elements in the path array
Actor (UT) PathActor
what should be moved
PathPoint Path[35]
maximum 35 nodes in the path, hence 33 real positions
float uValue
Offset in the segment

The main property that needs to be set for this is advanced > bStatic to false. Use along with pathpoints to make dynamic moving vehicles.

Imagine the applications in Unreal 2 :)

Wormbo: Funny to see pages like this over one year later. :p