Creating a New Path Type
1. Create a new PathTemplate
- Right-click in the Content Browser.
- Select Errant Paths category.
- Click the Path Template.
- Select
EpPathTemplate
class.
2. Add a mesh
- Open the newly created PathTemplate.
- Add a
PathTemplateSplineMesh
component. - Select a mesh asset for that component.
- Find a properties called Start/End and modify them to tweak the mesh dimensions.
- Optionally adjust the MeshForwardAxis to make the mesh face the forward direction in the Blueprint.
- Assign a PathLayer to the mesh component.
3. Tweak the MainPathSpline
PathTemplate should contain a MainPathSpline component. That component defines the main axis of the Path.
- Move MainPathSpline points to align them with the start/end of the mesh.
- Alternatively, select the MainPathSpline and click Fit to Blueprint button. This will automatically adjust the PathSpline points to match the dimensions of the components.
4. Compile and save the blueprint
During the BP compilation we validate the PathTemplate and show warnings if there are any issues. We also precalculate certain data used during the Path generation.
note
If any of the meshes becomes unresponsive, try recompiling the blueprint.
5. Create a new PathDescription
- Right-click in the Content Browser
- Select Errant Paths category
- Click Path Description
- Select
EpPathDescription
class
6. Use the previously created PathTemplate in the PathDescription.
7. Compile and save the PathDescription
8. Spawn the Path in the level
You can now spawn a Path based on the newly created PathDescription or modify PathDescription in one of the exisitng Paths in the level.