Added Observation Scene to show the Replay
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.Cinemachine.Samples
|
||||
{
|
||||
public class TurnAroundPlayer : MonoBehaviour
|
||||
{
|
||||
public GameObject Player;
|
||||
SimplePlayerController m_PlayerController;
|
||||
|
||||
void Start()
|
||||
{
|
||||
m_PlayerController = Player.GetComponent<SimplePlayerController>();
|
||||
}
|
||||
|
||||
void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.CompareTag(Player.tag))
|
||||
m_PlayerController.MoveZ.Value *= -1f; // flip direction
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user