Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. var hit : RaycastHit;
  2. if (Physics.Linecast (target.position, transform.position, hit)){
  3. distance = hit.distance - 0.2;
  4. point = hit.point;
  5. }else if(Vector3.Distance(transform.position, point) > 0.3 && !scoped){
  6. distance += 5.0 * Time.deltaTime;
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement