Raycast versus collider triggers

Newbie question: I watched the tutorial video on raycasting and it was very interesting. A box dropping from above deploys a parachute when it was some distance from the ground.

Had I not known about raycasting, I probably would have set up a collider 4 feet above the ground and used the triggers to achieve the same effect.

Raycasting is also used for guns to detect hits on enemies, but again, I’ve used colliders on my projectiles to achieve the same result.

Is there a performance difference using one method over another? Are there obvious cases where one method is better than another? To my inexperienced mind they seem to achieve similar results, so it’s not clear what the pros and cons are for each option.

Wow!
This is a nice yet difficult/complex question to answer. :smile:
Since it can go many ways.

From what I know:
Colliders, in most/some cases, are better used for, slower/slowish fastish, projectile type objects,
like Bazooka shells, Torpedos, Missiles, Slowish magic attacks eg. Reptiles MK 2 Sound orb ball type move.
And in some cases, can be used, for long lasting, Full contact, long range penetrating lazer beams, like Cyclop’s Optic Blast super attack. X men vs. Street Fighter, which lasts a while when used.
Mizoguchi’s Tiger Bazooka magic attack.
Ray’s Ray tornado
SF 2 Ryu’s Ha Do Ken magic

From what I’ve gathered, from unity tuts and game devs on the internet.
Raycasts, are normally suitable, for rapid firing machine guns and fast shooting laser blasts.
And animation tricks are used to fake the rest.

I found this.

Hope this helps. :smile: