API

Functions

Subscribe

PUT Subscribe(Transform caller, args SpringData data)

Invoking this function will allow you to subscribe an object to the Motion Manager and receive a Handle from it, this will allow you to add forces to the object.

Path Parameters

Name
Type
Description

Caller

object

Transform from the object you wish to subscribe.

Request Body

Name
Type
Description

TranslationData

object

SpringData pertaining to the translation of the caller.

RotationData

object

SpringData pertaining to the rotation of the caller.

ScaleData

object

SpringData pertaining to the scale of the caller.

[SerializeField]
private SpringData translation;

[SerializeField]
private SpringData rotation;

[SerializeField]
private SpringData scale;

private Handle handle;

private void Start(){
    //Get the handle by subscribing the object to the MM.
    handle = MotionManager.Instance.Subscribe(transform,
     translation, rotation, scale);
     
    handle.Translate(Vector3.up);
}

Last updated

Was this helpful?