Please enable JavaScript.
Coggle requires JavaScript to display documents.
AI Obstacle Ideas and How It Will Traverse Them - Coggle Diagram
AI Obstacle Ideas and How It Will Traverse Them
stationary, non-climbable obstacles
boxes
stairs
spikes
My AI could traverse stationary obstacles that can not be climbed over. It could do this by first assessing whether or not it is a non climbable stationary obstacle (by seeing what layer it's on). When the AI does see that it's a stationary non climbable object, it will stop a certain distance away from the object. It will then jump in the air and while it's still in the air the AI will continue moving forward when it can't see the obstacle in front of it anymore, therefore moving over the object while the AI is in the air. The AI will have 2 raycasts for this. One facing towards the ground to detect pits, and one facing forward.
pits
projectile obsticles
projectiles shot from bad guys that will kill the AI if the AI touches them
bullets
flying pentagons
My AI could traverse projectile obstacles aimed toward the AI. My AI could do this by first seeing if the object is a projectile type of obstacle (by seeing what layer it's on). After this my AI could see how large the obstacle is, or how high up the projectile is (by seeing which raycast detected it). After the AI knows this it can decide whether it's low down and short enough to jump over, or whether it's high enough or large enough to be shot at.
Enemies
bad guy entities that will kill the AI if the AI touches it
death rectangles
death circles
My AI could traverse enemies. It could do this by first assessing whether the object is an enemy (by seeing what layer it's on). When it does see the obstacle is an enemy I could make it so the AI stops and assesses whether the enemy is moving towards the AI. If the enemy is moving towards the AI I would make it so the AI sees how far the object is at this time, and then a short time later, and make my AI move away by this distance as well, so it moves away from the approaching enemy. While doing this it will also be shooting the enemy a certain number of times a second. I will make the bad guys work around health systems so some bad guys will be slightly tougher than others. I will not be making any UI to show the health system in-game, because my project is being made for developers.
stationary, climbable obstacles
ladders
ropes
My AI could try to traverse obstacles that require climbing. It could do this by assessing first, if the obstacle is climbable (by seeing what layer it's on). When it does see that the obstacle is climbable I could make the AI move so it's right next to the obstacle, put the friction of the obstacle to 0, and then tell the rigidbody of the AI to move upwards until the climbable object is not in front of it any more. After this the AI would continue moving forward ad normal.