I love the smell of UnrealEd crashing in the morning. – tarquin
Difference between revisions of "Legacy:ObjectPath"
m (added details/layout/spell fixes) |
|||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
Allows an object to follow a defined path, by specifying [[Legacy:PathPoint|PathPoint]] nodes. | Allows an object to follow a defined path, by specifying [[Legacy:PathPoint|PathPoint]] nodes. | ||
− | '''Note:''' At least 4 PathPoints must exist. | + | '''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. | + | '''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:<br />B0(u) = (1-u)^3 <br />B1(u) = 3u(1-u)^2 <br />B2(u) = 3u^2(1-u) <br />B3(u) = u^3 | Uses the Bernstein basis functions for Bezier interpolation:<br />B0(u) = (1-u)^3 <br />B1(u) = 3u(1-u)^2 <br />B2(u) = 3u^2(1-u) <br />B3(u) = u^3 | ||
Line 12: | Line 12: | ||
===ObjectPath Group=== | ===ObjectPath Group=== | ||
− | ; bool bAlterPitch : Should the pitch of the actor be modified during movement. | + | ; 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 bAlterYaw: Should the yaw of the actor be modified during movement. |
− | ; bool bAlterRoll : Should the roll 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. | + | ; 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. | + | ; rotator RAdjust: Adjust the rotation of the object. |
===Hidden=== | ===Hidden=== | ||
− | ; bool bPlayedOnce : Really don't play it again since it's already finished last time | + | ; 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 | + | ; bool bTriggeredOnce: Don't repeat the path if it's already played through |
− | ; int curNode : Which node are we at? | + | ; int curNode: Which node are we at? |
− | ; vector lastPosition : Where the actor was in the most recent frame | + | ; vector lastPosition: Where the actor was in the most recent frame |
− | ; rotator lastRotation : The orientation of the actor 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 | + | ; int numPathNodes: how many elements in the path array |
− | ; [[Legacy:Actor|Actor]] PathActor : what should be moved | + | ; [[Legacy:Actor (UT)|Actor (UT)]] PathActor: what should be moved |
− | ; [[Legacy:PathPoint|PathPoint]] Path[35] : maximum 35 nodes in the path, hence 33 real positions | + | ; [[Legacy:PathPoint|PathPoint]] Path[35]: maximum 35 nodes in the path, hence 33 real positions |
− | ; float uValue : Offset in the segment | + | ; 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 | + | 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 [[Legacy:Unreal 2|Unreal 2]] :) | Imagine the applications in [[Legacy:Unreal 2|Unreal 2]] :) |
Latest revision as of 07:42, 22 May 2021
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[edit]
ObjectPath Group[edit]
- 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[edit]
- 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