📕
Motion Warping for Unity
  • 👋Welcome!
  • concept
    • ⭐Introduction
    • ⚙️How this asset works
  • Fundametals
    • 🔸Motion Warping Asset
    • 🔸Motion Warping Component
    • 🔸Warp Providers
    • 🔸Motion Warping IK
  • Components
    • 🔌Mantle Component
    • 🔌Vault Component
    • 🔌Land Component
    • 🔌Roll Component
    • 🔌Align Component
Powered by GitBook
On this page
  • In the Editor
  • In Code
  1. Fundametals

Motion Warping Component

In this section you will learn how to work with Motion Warping component.

PreviousMotion Warping AssetNextWarp Providers

Last updated 4 months ago

In the Editor

Motion Warping is the main component in the system, as it is used for initiating interactions and warping animations in runtime. Make sure to add this component to your character:

Let's break down each property of this component:

  • Scale Play Rate: whether to modify the original play rate; for example, if the distance is longer - the play rate will be reduced, if shorter - increased.

  • Play Animator: whether to automatically play the animation via Animator.

  • Blend Time: cross-fade blend in time for the animation.

  • OnWarpStarted: called right before the interaction. Use it to disable collisions and other systems.

  • OnWarpEnded: called right after the interaction. Use it to enable collision or movement.

In Code

It is important to reference the Motion Warping component in your controller code:

public class YourController : MonoBehaviour
{
    //...
    private MotionWarping _warpingComponent;
    //...

    private void Start()
    {
        //...
        _warpingComponent = GetComponent<MotionWarping>();
        //...
    }
}

We will use this component to start interactions. And more about that in the next chapter!

🔸
Example of a set up Motion Warping component.