Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ray ray = new Ray(laser.transform.position,transform.forward);
- RaycastHit hit;
- if(Physics.Raycast(ray, out hit, 10f))
- {
- var hitPlayer = hit.collider.gameObject;
- CmdDoShotSomeone(gameObject, hitPlayer);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement