Is there a way to identify the state of the scene obstacles?
I am making a 2D platformer game research and I was thinking how it would be possible to let an AI know what the state of the environment in front of it is. For example, there is a platform above the AI, and another platform a few distance away from the first platform. So, by knowing this, the AI can perform a certain action (eg. jump on each platform) depending on the placement of objects and continue to go through the obstacles.
I am currently planning on using coroutines and list of keypresses to record the data in a hashtable that the AI can use to perform actions but I need to let the AI know when to use a certain action for that obstacle course.
I have thought about using OnCollisionEnter2D() and parent it to the player object, will this method somehow give me my desired output?
oh, i didnt think of that, ok I will try to implement it!