Guest User

Untitled

a guest
May 27th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. void FixedUpdate()
  2. {
  3. transform.Translate(Vector3.forward * Time.deltaTime * speed);
  4.  
  5. if (Physics.Raycast(transform.position, transform.forward, 100.0f))
  6. print("There is something in front of the object!");
  7.  
  8. }
Add Comment
Please, Sign In to add comment