I have to admit, I have been having an absolute devil of a time getting this package integrated into my game.
A wrinkle is I’m pathfinding vehicles, but I keep it really simple, by merely reducing the speed when not facing the right direction. This tactic worked well enough with Unity’s pathfinding system, and worked fine with RichAI in my example project, so I don’t think this is the source of my numerous problems.
Besides that, I just need to align the units to the ground, and that’s proving to be an unbelievable hassle.
I am using RichAI, but I have disabled movePosition
and moveRotation
, instead opting to follow it via rotating and translating based on the steeringDirection
, thinking that’ll give me the freedom I need to control the speed and rotation for my needs.
Velocity
seems to only represent actual movement in the last frame, so that’s unreliable. I have no clue what desiredVelocity
is feeding me, because the units will just drive off into the sunset, down the +X axis. I used those equivalents in Unity’s pathfinding, and they were useful, but here, I steeringDirection
is the only variable I seem to be able to trust.
If I were to summarize my troubles, the pathfinding system seems deathly afraid of hills, or anything where the normal isn’t straight up.
I made a little test “hill” with a very shallow sphere.
Getting the nearest position seems to avoid hills, jumping to the closest flat area next to the hill.
Paths seem to avoid the smallest hills, as if they’re huge obstacles.
Any time my unit is on ANY hill, the unit will “jitter.” Its speed will be erratic. If it’s totally flat, it’ll work normally.
Does the steering direction account for hills at all? I can’t tell so far.
Any ideas how to proceed?
I’m just fiddling endlessly, and I don’t feel like I’m making progress. Honestly, I didn’t think I’d be spending days and days on this, considering I had it working with Unity’s janky pathfinding.