I would like it so that the gun my character is holding will automatically shoot if a zombie is in front of it. I was thinking of just having a ray being casted in a loop and see if it hits anything. Does this cause lag or issues?
You can cast many rays every frame without worries. Try to keep the rays short in length (don’t ray with a distance of 1,000,000 just because you can) and I doubt you’ll see any issues from rays.
2 Likes
Yes it will lag if your not careful how you setup the loop