You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
454 B
C#
18 lines
454 B
C#
using CnControls;
|
|
using UnityEngine;
|
|
|
|
namespace Examples.Scenes.TouchpadCamera
|
|
{
|
|
public class RotateCamera : MonoBehaviour
|
|
{
|
|
public float RotationSpeed = 15f;
|
|
public Transform OriginTransform;
|
|
|
|
public void Update()
|
|
{
|
|
var horizontalMovement = CnInputManager.GetAxis("Horizontal");
|
|
|
|
OriginTransform.Rotate(Vector3.up, horizontalMovement * Time.deltaTime * RotationSpeed);
|
|
}
|
|
}
|
|
} |