fixed start scene

This commit is contained in:
2023-09-01 20:27:19 -04:00
parent e552c3453d
commit 1872f09868
13 changed files with 20826 additions and 9 deletions

View File

@ -109,6 +109,11 @@ public class PlayerMovementController : MonoBehaviour
private void MovePlayer()
{
var movement = Vector3.zero;
//Modified to a normal 1 vector to ensure speed is not greater when moving diagonally.
Vector2 normalizedInput = new Vector2(x, y).normalized;
x = normalizedInput.x;
y = normalizedInput.y;
//movement += transform.forward * Mathf.Abs(y) * Time.deltaTime * speed;//+(transform.right*x*Time.deltaTime*speed);
movement += cam.transform.forward * y * Time.deltaTime * speed;