Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. //Checking for Input every frame and putting it in a variable
  2. moveHorizontal = Input.GetAxisRaw("Horizontal");
  3. moveVertical = Input.GetAxisRaw("Vertical");
  4.  
  5. //Movement Input
  6. Vector3 moveInput = new Vector3(moveHorizontal, 0f, moveVertical);
  7. Vector3 moveVelocity = moveInput.normalized * moveSpeed;
  8. //Method from PlayerController Script
  9. controller.Move(moveVelocity);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement