Working on better ray casting for my bevy destructible terrain plugin.
#bevyengine #indiedev #gamedev #madewithbevy #rust
@donkulosislabs Thinking from the perspective of a glitch hunter, how hard is it to get the rays to be cast out of bounds?
@julian_beides Good question! In this example, I'm treating white as solid terrain, so zero-length collisions happen immediately when performed out of bounds. But, determination of solidness happens on a per ray basis, so I could see the "solid" condition being flipped based on where the ray originates, to get edge detection no matter where the ray starts. Hope that answers your question!
@donkulosislabs So the detection operates on 2D pixel data and not on a boundary path? That sounds pretty robust
@julian_beides That right. Pixel data is stored in a quad tree, so this ray casting impl is really just walking across tree nodes in a line, looking for whatever criteria you like.