Here is my current code for player movement:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerController : MonoBehaviour {
public float speed = 10;
private Rigidbody rig;
// Use this for initialization
void Start ()
{
rig = GetComponent<Rigidbody>();
}
// Update is called once per frame
void Update ()
{
float hAxis = Input.GetAxis("Horizontal");
float vAxis = Input.GetAxis("Vertical");
Vector3 movement = new Vector3(hAxis, 0, vAxis) * speed * Time.deltaTime;
rig.MovePosition(transform.position + movement);
}
}
As of now my camera could be facing backwards and he still moves along axis
Thanks for any answers ![]()