If I change something in Input manager I think it might effect the other scripts that use GetAxis, so is there another way to make it stop returning to center ? I’m trying to set up a basic third person controller and the script is for rotating the player in the movement direction. Currently player turns towards the movement direction but when getaxis returns to zero it goes back to its original rotation. Here is the script;
using UnityEngine;
using System.Collections;
public class CharacterMovement : MonoBehaviour {
Vector3 directionVector;
void Update () {
directionVector.x = Input.GetAxis ("Horizontal");
directionVector.z = Input.GetAxis ("Vertical");
transform.rotation = Quaternion.LookRotation(directionVector);
}
}
Or is there a better way to achieve what I’m trying to do ? Any help is appreciated.