Advertisement
Guest User

Untitled

a guest
Dec 15th, 2018
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. float distance = Vector3.Distance(transform.position, lastFootprintPos);
  2. if (distance > newFootprintDistance) {
  3. Instantiate(footprintPrefab, transform.position, Quaternion.identity);
  4. lastFootprintPos = transform.position;
  5. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement