Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void FixedUpdate()
- {
- transform.Translate(Vector3.forward * Time.deltaTime * speed);
- if (Physics.Raycast(transform.position, transform.forward, 100.0f))
- print("There is something in front of the object!");
- }
Add Comment
Please, Sign In to add comment