In this section you will learn about warp providers.
Technical Aspects
Warp Providers are components that provide active interaction with target points.
Example: the built-in MantleComponent will search for the climbable obstacle point, and then pass it to the Motion Warping component.
This plugin offers a common interface - IWarpProvider - that can be used to create custom Warp Providers. This interface contains a single method called Interact that returns the result of a check:
WarpProviderInterface.cs
publicstructWarpInteractionResult{publicWarpPoint[] points; // Target points.publicMotionWarpingAsset asset; // Warping asset with settings. publicbool success; // If the interaction can be started.publicboolIsValid() {return success && points !=null&& asset !=null; }}publicinterfaceIWarpPointProvider{publicWarpInteractionResultInteract(GameObject instigator);}
The plugin supports both moving and static obstacles out of the box. Here is how to correctly pass the data for each obstacle type:
Moving obstacles
To make the Warp Point depend on a specific transform, make sure to specify that target transform, and convert the point world coordinates to that transform's space: