Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- transform.Translate(userDirection * movespeed * Time.deltaTime);
- if (Input.GetKeyDown(KeyCode.LeftArrow))
- {
- Vector3 position = this.transform.position;
- position.z++;
- this.transform.position = position;
- }
- if (Input.GetKeyDown(KeyCode.RightArrow))
- {
- Vector3 position = this.transform.position;
- position.z--;
- this.transform.position = position;
- }
- //Debug.Log("update");
- Vector3 forward = transform.TransformDirection(Vector3.forward) * 10;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement