So I just deployed an update with a new type of of behavior block: RayCast. This is something that has been needed for a long time.
Ray Cast will send out and invisible ray from your object, and outputs either a hit or miss depending on whether it strikes another object. This allows an object to check the space around it. Among other things, it can be used to:
Easily check if the object is on the ground, to prevent double jumping
Check the space in front of an NPC, so that they don’t walk off a cliff
Checking line-of-sight for enemies
Anything that requires checking the objects around you, like collision checking for grid-based collision detection
Documentation was added to the behavior handbook, and an example with an NPC cliff check, and double-jump prevention is here: http://flowlab.io/game/view/842398
It shows how to use a RayCast to check for edges, and how to use it to prevent double jumps.
While this is technically the same principle that Doom & Wolfenstein used, this is not really a useful method of rendering. I suppose you could use this for pathfinding though - I’ll try to work up an example for that as well.
@PixelPizza I thought exactly the same, but I actually don’t really need it. The preview when opening the RayCast settings panel (it should be called properties panel :dissapointed: ) is good enough.