implementation of drecon in unity 2022 lts
forked from:
https://github.com/joanllobera/marathon-envs
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
639 B
27 lines
639 B
7 months ago
|
using Cinemachine;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class RotateCamera : MonoBehaviour
|
||
|
{
|
||
|
// Start is called before the first frame update
|
||
|
|
||
|
public CinemachineVirtualCamera m_VirtualCamera;
|
||
|
[SerializeField]
|
||
|
private float m_Rotation;
|
||
|
|
||
|
public float m_RotationSpeed;
|
||
|
|
||
|
// Update is called once per frame
|
||
|
void Update()
|
||
|
{
|
||
|
m_Rotation += Time.fixedDeltaTime * m_RotationSpeed;
|
||
|
|
||
|
if (m_VirtualCamera != null)
|
||
|
{
|
||
|
m_VirtualCamera.GetCinemachineComponent<CinemachineOrbitalTransposer>().m_XAxis.Value = m_Rotation;
|
||
|
}
|
||
|
}
|
||
|
}
|