fixed start scene
This commit is contained in:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user