I don’t know what got me on this, but it seems like rays should be included under the colliders tab in the editor.
So why are rays only accessible in script?
I don’t know what got me on this, but it seems like rays should be included under the colliders tab in the editor.
So why are rays only accessible in script?
A ray isn’t a collider. A ray is a straight line. A ray cast is simply a check if there are any colliders in a straight line.
It doesn’t make much sense to attatch a ray to an object. You might use a thin box collider.
Thin capsule one would be better IMO.
True.
In general you do have to be careful with thin colliders of any sort. They have a tendancy to pass through things.
0.01 in diameter is thin enough and with collision set to continuous (can’t remember if you had to set it on collider or rigid body right now) it won’t pass through.
As an actual colliding object, it doesn’t make any sense and you won’t be able to get the same kind of collision data out of a ray as you would from the polygonal colliders.
… buuuut; in theory if you wanted physics triggers/detection to be more event based as nice little compartmentalized components, I could see a use case for a ray trigger.