Ok so i am new to programming, kinda developing my first 3d game here as a project for my grade 11 computer science class. I need sme ones help …
K so i have a sprite e.x zombie that basically moves towards the the main character using its world position. They are both part of a physical space so that they dont go through walls or anything but if there is an object between the main character and the sprite, the sprite will try to go through the object to get through char but being part of physical space restricts the zombie from doing that so basically he gets stuck behind the object. How do i implement so that the sprite walks around the object instead of coding exact places where it might get stuck and telling it to take a different route(this is quite hectic).
Plz help
Thanks
There are many ways to do that. The simplest solution would be to make a collision grid and then when the zombie collides, it moves back to previous grid and check around for other ways. You can use the a-star algorithm also, that is more advanced through.