I have a character in my game that the player controls by clicking somewhere in the world, fairly basic RTS movement. All of this happens on a grid graph where I have the ‘accountForSlopes’ variable active as there are slopes in my game.
What I’m working on now is that the player can have a pet that simply follows the player around with a slight offset. Right now I solve this by using the AIPath component with a ‘endReachedDistance’ of 1 to be slightly behind the player at all times and simply setting the ‘target’ of the AIDestinationSetter to the moving transform of the player. This works great so far. But as soon as the player climbs up a slope, which makes it ‘Y’ change the pets ‘Y’ remains the same and it dissapears in beneath the terrain the actual player has been elevated to, the ‘X’ and ‘Z’ are still correct.
I’ve also tried the AIPathAlignedToSurface component, but it didn’t change anything. Any suggestions for this case?