Scripting API

To control cam rig via script, you have the following options:

Set the base animation:

SetBaseAnimation (string animationName);

As animation name parameter you can use the following:

  • „Idle“
  • „WalkingSlow“
  • „WalkingNormal“
  • „WalkingFast“
  • „Running“
  • „Sprint“
  • „Driving_1“
  • „Driving_2“
  • „FlightNormal“
  • „FlightTurbulent“
  • „FlightFullThrottle“

Set the speed of the animation:

SetSpeed (float speed);

Set the intensity:

SetIntensity (float intensity);

Animate local position yes or no:

AnimateLocalPosition (bool trueOrFalse);

Set the intensity of the local position animation:

SetAnimateLocalPositionIntensity (float intensity);

Example:

using UnityEngine;
using System.Collections;

public class Example : MonoBehaviour {

    public CamRig camRig;
    
    void Start () {
        camRig.SetBaseAnimation ("Flight");
        camRig.SetSpeed (8.5f);
        camRig.SetIntensity (0.8f);
    }
}