〰️Path Constraint
✅
Last updated
✅
Last updated
This component allows the character to travel on a path. This is the connection between the Path Link and the Animal Controller.
It requires to have a reference to the Animal component.
With the component added to your character, when you get closer to any Path Link the character will activate the nearest path and it will activate the Path Constraint. All the properties to control the animal while is on the path, are set on the Path Link component.
As a recommendation set the Path Constraint inside the Animal Controller internal components, as a child gameObject.
Some paths are not set to be automatic. To activate them you can add an Input connection and use the method TryEnterExitPath()
This also works for exiting a path in the middle of it.
Reference for the Animal Component.
Current Active Path on this Path constraint
Forward point to calculate the path direction. This value must be small. It is used to identify hard turns in the path.
Radius to search a nearby path. When the Path Constraint sphere trigger and the Path sphere triggers intersect. It means the Character can activate a path.
An offset of the Radius value relative to the Animal Controller position.
Lerp Value to orient the Character to the path. The higher the values the faster the character orient to the path
Lerp Value to position the Character to the path. The higher the values the faster the character orient to the path
Is invoked when the Character has entered a Path
Is invoked when the Character has exited a Path