Available with the following Subscriptions: All subscriptions
Available for the following Project Roles: Editor, Admin
Use Visual Program Nodes to stop a Resource at a chosen point along a 3D Line, complete an action such as removing cargo, then continue to the end of the line. This setup uses one 3D Line and two movements.
💡 Note: Basic knowledge of Visual Programs and animation Nodes is required. For more information visit the user guide section: 11.5 Visual Programming Nodes.
Set Up the Two Movements
A Resource with an animation template applied is required. The first movement stops the Resource at the chosen point, and the second movement continues from that point to the end of the 3D Line. While stopped, the cargo will disappear.
- Add a Value Transition Node (1) for the first movement and connect it's Started and Out output ports to the Get Scene Curves Node's (2) Trigger and Sample input ports respectively.
- For the Value Transition Node (1) set A to 0, this way the movement starts at the beginning of the line.
- Add a Path Percentage Node set to Number. Also set the value (4) to the stop point, for example 40%, and connect it to B (5). This way the stop point will be at the 40% progress point along the length of the path.
- Add a Path 1 Duration Node set Number. Also set the value (6) to the time the first movement should take, for example 5 seconds.
- Connect the Finished output port of the first Value Transition Node: Movement 1 to the B input port to the Animate Bone Node: Remove Cargo (7).
- Add a second Value Transition Node (8). Connect the Get Scene Curves Node's (2) Finished output port to the Value Transition Node's Trigger input port (8).
- For the second Value Transition Node (8) set its A input setting to the stopping point defined in step 3 above. Set its B input setting to 1 (10). Set the Duration (11) to the desired length of time.
💡 Note: Changing the Path Percentage values changes the distance each movement covers. Adjust both durations so they are equally proportional to the line length, this keeps the vehicle speed consistent.
Comments
Please sign in to leave a comment.