class MAGES::OnTilt

Overview

Invokes a callback when the object is tilted. More…

class OnTilt: public MonoBehaviour
{
public:
    // properties

    UnityEvent OnTilted;
    UnityEvent OnRestored;
    Vector3 LocalUpVector;
    float TiltAngle;
};

Detailed Documentation

Invokes a callback when the object is tilted.

Properties

UnityEvent OnTilted

Gets an event, invoked once when the object is tilted.

UnityEvent OnRestored

Gets an event, invoked once when the object is restored to its upright position.

Vector3 LocalUpVector

Gets or sets the vector that represents the local up direction of the object.

float TiltAngle

Gets or sets the angle that if exceeded the object is considered tilted.