Hi.
I want to use navmeshAgent and it’s steering capabilities. But I want to extend it, find a plug in, or perhaps find a way to do what I want to do using what’s available.
I’ll keep this simple. Suppose I have 2 points I want the agent to get to, for this example say I want to walk him to a door, wait for door to open, then walk through door to a location in the next room… It’s simple enough to set destination to first point, then when get there - wait - then set the destination to the next room.
However, what I want to do is set the first point so that he walks around using the agent’s steering system, and ends up facing the door.
Currently, depending on where he was previously in the room, he could end up facing with back to door, sideways, or whatever.
Now yes I could just rotate him when he gets there, using a slerp or similar, but that looks ugly. And of course I can control the rotation myself, but that’s also looks ugly.
Take the attached image. In image A, I want to start at the Green, end at the red facing the door (blue). Imagine there are obstacles in the way (not pictured)
If I use the navmeshAgent as it is, sometimes B happens, which ends with the agent facing sideways to the door (so now I have to rotate it - which looks stupid). Whereas C would’ve been better and more “realistic” as he ends up facing the door.
Now, second example. I start off in green facing right. and I want to end up where the red dot is facing the door.
Currently the navmeshagent will do E and i’ll end up facing away from the door (so now i’ll have to get there, and then rotate to the correct angle). What I’d like the nav mesh agent to do is to use it’s angular velocity and project a bit further into the future past the end point, so that it ends up facing the correct direction using the navmesh.
And indeed sometimes (due to the turning circle) I end up with the agent rotating past where he should end up facing, close to the end point. And then gets to the end point - and I have to rotate him back (Which again looks a bit daft)
Is this possible?
Or do I have to write my own navigation solutions?