Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. Assertion failed: Assertion failed on expression: 'pos < this->m_num_bits'
  2.  
  3. using UnityEngine;
  4. using System.Collections;
  5.  
  6. // Performs a mouse look.
  7.  
  8. public class FPSInput : MonoBehaviour
  9. {
  10. public float speed;
  11. private CharacterController My_controller;
  12.  
  13. private void Start()
  14. {
  15. My_controller = GetComponent<CharacterController>();
  16. }
  17.  
  18. private void Update()
  19. {
  20. PlayerMove();
  21. }
  22.  
  23. private void PlayerMove()
  24. {
  25. bool gravity_vector = false;
  26. move_vector = Vector3.zero;
  27. if (Input.GetKey(KeyCode.W))
  28. {
  29. transform.position += transform.forward * speed * Time.deltaTime;
  30. }
  31. }
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement