Ray trigger

It would be useful to have a trigger to detect if a ray (from raycast) hits the object.

My idea is to make it work like messages and mailboxes. The ray has a message, when the ray trigger detects a ray it checks the message and if it’s the same as the ray trigger it sends an output.

This is something I really need in my game right now lol.

@grazer What do you think? This would be really useful.

is this discussion invisible??!

Took me a while to understand how this would be any different from attaching a message block to the hit output of raycast, but in your suggestion the ray triggers only the object hit, whereas the output hit message approach triggers all the objects of the same type. Seems useful and there’s no real way to do that at the moment, maybe unless you construct your own raycast that emits a nonsolid block with collision properties?

Yeah that’s exactly what I meant. I’m probably not the best at explaining stuff lol.

Emitting something invisible would also be a good idea, but RayCast would be much easier to use. It’s also much faster because the invisible object needs velocity (and it shouldn’t be too fast, else it can go through objects)

But there is the Raycast @Latif3 tho

EDIT: Basicly I read this thread once, but then I come again and forgot totally and it makes me hit my head on the keyboard and comment

@PixelPizza Read the thread before you post

What if you had a proximity that has the radius as the rays length- and when it triggers, the Ray fires to check, and if it hits- yay