Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var hit : RaycastHit;
- if (Physics.Linecast (target.position, transform.position, hit)){
- distance = hit.distance - 0.2;
- point = hit.point;
- }else if(Vector3.Distance(transform.position, point) > 0.3 && !scoped){
- distance += 5.0 * Time.deltaTime;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement