Unity Animation and Cinematics: Experiments

I am working on th next phase of development for Lunarium. I want to set up Lunarium as a Rift VR experience and test this on my quest via link so that after christmas I can start to test for quest. 

To experiment with getting more narrative engagement and player interaction, I have decided to further develop the Top Tent animation scene. 

To do this, I will need to include multiple animated characters and will include a ringmaster, alienated death and flying bats and add further player interaction. 

The object of this scene is to watch a cut scene and then the player must solve a puzzle to get past the alienated death character and jump into the large hole beneath. 


I need to: 

1) Create a bat object with wing animation 
2) Set looped motion to move the bat around the toptent ceiling.
3) Create new RingMaster character with walk cycle, idle and turning options. 
4) Animate the Alienated Death Character so that when it breaths in (The body inhales) the air is forced out of one of the 3 tubes which flipps the eye and plays a note. 
5) The player must play the notes in the correct order, to close the eyes and enter the hole beneath the alienated death character. 


I am following a Unity Tutorial which covers all aspects of animation, cinemachine and timeline. 



Coding Motion:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;


public class Mover : Monobehaviour
{
private Transform ThisTransform = null;
public float Speed = 1f;
public Animationcurve SplineCurve;

//Start is called before first frame update
voide Awake()
{
ThisTransform = GetComponent<Transform>();
}

//Update is called once per frame
void Update()
{

ThisTransform.position += Speed * ThisTransform.forward * Time.deltaTime;
float Y = SplineCurve.Evaluate(Mathf.PingPong(Time.time,1f));
ThisTransform.position =  new Vector3(ThisTransform.position.x,
Y,ThisTransform.position.z);
}
}

This animates and object in the direction it is looking with variable speed and motion curves. 
Y axis will bounce the object whereas z axis will slow down and speed up the object.  

Editor Motion:
Animation Window

Set simple animation in timeline using keyframes and curves it is possible to set looped motion.

I can also connect motion with an animation event using the animation tab in the timeline. The following is a short peice of code which is set at the point where the character jumps off the ground.. they shout ‘Yippeee’!

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PrintMessage : MonoBehaviour
{
    public void SayMessage()
    {
        Debug.Log(“Yipeeee!”);
    }
}

Next I created a character model in fuse ‘RingMaster3’ saved to CC and then exported to Mixamo.

Mixamo autorigs the character and offers two additional rigging options. Firstly it offers facial rigging and secondly, finger rigging. I chose both options as I am trying to create better character-player interactions as well as adding more hand interaction in quest later on.

The options to export from Mixamo are :

Download: Maya and 3ds max as FBX files, Blender DAE or Modo FBX,

Animate: Game Engines Unity, Unreal and others. This is where Mixamo can save time in animating walk cycles etc. 

I chose to:

Download FBX for Unity saved to my Google Drive file and CC as a rigged T Pose.

Download DAE to further edit in Blender

Animate multiple animations in mixamo which includes walk and idle animations.

To Do:
  
1) Create a bat object with wing animation 

2) Set looped motion to move the bat around the toptent ceiling.

Done – Create new RingMaster character with walk cycle, idle and turning options. 

4) Animate the Alienated Death Character so that when it breaths in (The body inhales) the air is forced out of one of the 3 tubes which flipps the eye and plays a note. 

5) The player must play the notes in the correct order, to close the yes and be able to enter the hole beneath the alienated death character.