-
What do you want to achieve? Keep it simple and clear!
I want to make an turret that checks 180 degrees if there is an humanoid there within 10 studs range with raycast -
What is the issue? Include screenshots / videos if possible!
i cannot get it working -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i tried to look at some devforum topics
You would just need to fire multiple raycasts in a semi-circle to check the 180 degrees. (unless there is an easier way that came around more recently. I’ve been on here for awhile and a lot of things changes)
You could loop through every humanoid in the workspace then check if they are within 10 studs of the turret then use dot product to figure out if it’s within the disired angle
This is very inefficient in my opinion. Shooting that much ray in such little interval would be quite expensive
What do you mean by dot product i’ve never heard it before
This is perfectly what i need thank you
You’re right, I’m tired after just coming off a 12 hour security shift, and I haven’t done raycasting in awhile as I’ve been mostly doing UI and websites recently.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.