Im relatively new to programming ai enemies. Im just trying to make an enemy ai follow/approach the player. But the problem is the character is known a 3d sphere similar to Mario galaxy, I’ve tried a lot such as trying to make a system based off of 2d plain ai tracking with latitude and longitude built in it. Any help on how to make an ai on the planet as such would be nice
#Spherical ai
5 messages · Page 1 of 1 (latest)
if it's just "go in a straight line to your target" it should be pretty easy. just use the direction to the target and use Vector3.slide() with the normal of the ground to get the direction along the ground. then normalize it of course.
ill try n implement what you said, although i dont completely understand the tasks im sure i can js google em.
it may be that im bad at ai still, but i cant seem to actually implement this correctly, could you give me an example on how this would look
func get_ground_direction(dir : Vector3, normal : Vector3) -> Vector3:
dir = dir.slide(normal)
return dir.normalized()