Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Ray casting a circular pattern rather than a straight line?

I want to do ray casting. And usually I think of ray casting as a ray from point A to point B. But what if I want a single ray that is in the shape of a circle? I know some people do a loop i.e. cast a ray many times, to take many beams and form a circular shape, but I want to cast just once! Is this impossible?

6 comments

0

Show us your script, please.

0

What kind of script are you expecting? I never made reference to a script; my question is theoretical and not practical. How else may I help you help me?

0

just change the ray shape to cylinder?

0

yes. how? I don't see a ray.shape property or anything of the sort; as others have said it seems to be only linear

0

"A ray is a line with an endpoint that extends infinitely in one direction" -Google.....no, there is no such thing and you would have to calculate a circle of rays manually...but I would personally recommend Region3 instead

0

Hi, question answered - what I asked for is actually a feature requested in Roblox Dev forum. So we wait.

3 answers

Instead of making a block part, change its shape?

part.Shape = Enum.PartType.Cylinder
--??

1 comment

0

i'm making a ray. there isn't a ray.shape property or maybe there is another way to do what you are saying?

Ray casts are linear and only linear. Meaning, there is no circular singular Ray. As far as i know.

This discussion is preserved as it was. New answers, comments, and votes are closed.