think of a laser, and how lasers work.
When you use a laser, you know how it starts somewhere and goes on seemingly forever?
thats what essentially a ray is.
now pretend you have access to the data of that laser. You can decide where it starts, and where it ends, but this laser that you're making in ROBLOX is invisible! its pure math!
now imagine that you can do stuff with the data you get from this laser. if it hits something, you can retrieve data from what it hit. you can also customize it to ignore stuff, so if it hits for example a part thats blue, it'll fly right through it as if it doesn't exist, if you code it properly.
wanna get more complex? do some math and create a reflection property on a part so that if you fire a ray onto it, it'll reflect properly like a real laser would.
|