// ---------------------------------------------------------------------------- // // Photon Voice Demo for PUN- Copyright (C) 2016 Exit Games GmbH // // // Third person character controller class. // // developer@photonengine.com // ---------------------------------------------------------------------------- namespace ExitGames.Demos.DemoPunVoice { using UnityEngine; public class ThirdPersonController : BaseController { [SerializeField] private float movingTurnSpeed = 360; protected override void Move(float h, float v) { this.rigidBody.velocity = v * this.speed * this.transform.forward; this.transform.rotation *= Quaternion.AngleAxis(this.movingTurnSpeed * h * Time.deltaTime, Vector3.up); } } }