Animation Action

This type of Actions is described as Actions in cases we want to insert an object, but the object needs to be inserted with an animated movement.

An example may be the insertion of a wire into a tube.

To implement this Action we would need to record the insertion of the wire, and then we will push it with our hands to the final position. The movement from the controller is translated into the normalized value of the animation [0-1].

Example of Animation Action:

public override void Initialize()
    //Helper variable to destroy the animated plug when coming back from a Perform (so not to have two of them)
    plug = GameObject.Find("PlugAnimated(Clone)");

    //The animated insertion of the Plug
    //In this example the user needs to insert the cable to the plug. The movement is recorded into an animation and played along with the movement
    //of the controllers

    //Hologram to pinpoint the correct insertion

    //We make sure the KnossosLight is turned off
    GameObject.Find("KnossosLight").GetComponent<Light>().enabled = false;


public override void Perform()
    //After inserting the cable we light up the knossos with
    GameObject.Find("KnossosLight").GetComponent<Light>().enabled = true;