Imagine a top-down game like Frogger, there are moving platforms and the AI needs to know if there is an adjacent platform to jump to or if it’s just open space and it would die.
They can move in 4 directions. They need to check ahead in these 4 directions to find out if they will land on a platform or not. NOTE: A tile based collision solution is not appropriate, since the platforms can move freely pixel by pixel.
Credit to @JCash for giving me the tip that I can use the build in collision system to pay attention to the “enter” and “exit” messages to keep track of which platforms the player is “overlapping” to know if there is a platform under him after he lands from a “jump” in this top down game.
So the only way forwards I can see is to extend that to create 4 “sensors” around the AI, give them their own collision group each: sensor_up, sensor_down, sensor_left, sensor_right. And then I can use the collision message data to know which sensor got a hit (by checking message.own_group) and track overlapping platform separately for each sensor.
Is that a sensible approach for this situation? (no pun intended)