New update - Ray Casting

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:

Let me know if you have any issues or questions!

Give me an example on how to use this, Ray cast…

For some reason it makes me think of the original Doom because of the raycasting tech they used back then

Doesnt this also mean pathfinding is technically possible now?!

@CrimsonBlackGames - I linked an example in the comment :slight_smile:

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.

If flowlab had a limited 3D function for that… SB4 would exist.

Now that I think about it, more cleverly made pac-man clones would exist on flowlab.

Oh nice now I can fix my games.

When do rounded rectangle colliders come so I can fix cube’s adventure.

This is really nice. I can do a lot of things with this.

It would be cool if we could see it on ctrl+D mode

You can see it when the RayCast settings panel is open, but not in Ctrl+D mode yet :frowning:

@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.

I Just created a super nice thing with this!


I already tried to do this in flowlab but it wasn’t perfect.
This time it’s so much simpler and easy to make.

The only that is left is a rope that connects the player to the wall AKA a visual thingy that makes it look cooler (doesn’t affect the logic)

If someone could create a rope without causing so much lag I could do an example game for this.

@PixelPizza hate to burst your bubble, but Im ahead of you on that. Crimson Hunters

@PixelPizza link?

Id still like to see this.

Maybe a draw line function that draws a line of select width from point A to point B

Crimson Hunters have a grapling hook? @CrimsonBlackGames
Show me da wae

The game is “Awakening” on the level “Village 2” (level 23)
(Contains a little spoiler but no one cares xD)

If you press shift and if the player have a white wall at ± 45 degrees it jumps to the location @grazer

Also did this Card Game Example with Ray Casting:

To finish it (add more cards) I would need to have a feature that sends a message to the specific object that ray cast detected

@PixelPizza it was originally a grappling hook, but now its something else close

Well could u send the link so I can check it out

Apparently looking up names works too

I’ll test this when I have time, but it sounds like Pokemon trainer ! behaviors with extras.