Hi Aron,
This month I’ve tried to test this new RVO controller, no success.
I cannot make my character move again with the example you did above. So, I went back to 3.8.2 again.
Please, can you give me a full example (simple script) for how can I make it to move with the new RVO?
I really don’t know what I need to do with the new RVO from 3.8.5
Currently, I am using RVO controller with the Seeker.
I call a path with seeker.StartPath and then I use the rvoController.Move with the default example of the 3.8.2 version.
I want to update now because my character sometimes is getting stuck in the same position ( there are no errors on graph, anything) and then, to unstuck, I need to manually move the character to another close position (like changing the transform.position directly). Did you ever see this problem in any case? Is it a bug fro 3.8.2 version?
According to my debug, its like the character is reaching the destination before it really reaches it.
This is the code I am using to check if reached destination:
Also:
Path _unitPath;
Seeker _unitNavmesh;
RVOController _controller;
if (_unitPath == null)
{
_controller.Move(-Vector3.up * Time.deltaTime);
return;
}
if (_pathWaypoint >= _unitPath.vectorPath.Count)
{
_controller.Move(-Vector3.up * Time.deltaTime);
return;
}
//MOVE
Vector3 dir = (_unitPath.vectorPath[_pathWaypoint] - _transform.position).normalized; //Direction to the next waypoint
_controller.Move(dir * _currentSpeed * Time.deltaTime);
//WP CHECK
if (Vector3.Distance (_transform.position, _unitPath.vectorPath[_pathWaypoint]) < 1.0f)
{
_pathWaypoint++;
//Debug: reached end?
if (_pathWaypoint >= _unitPath.vectorPath.Count)
{
_Debug_SaveMsg("REACHED DESTINATION");
}
return;
}
I use the seeker.StartPath for finding new paths (going to my destination).
EDIT: I just discovered that this is much more often when I use the
var guo = new GraphUpdateObject(GetComponent().bounds);
guo.updatePhysics = true;
AstarPath.active.UpdateGraphs(guo);
And then looks like, even cleaning the area (taking out the blocked nodes), my NPC got stuck inside and cannot move anymore (its like consider it reached destination). Is there any better way to do this?
I tried this:
var guo = new GraphUpdateObject(GetComponent().bounds);
guo.updatePhysics = false;
guo.modifyWalkability = true;
guo.setWalkability = true;
AstarPath.active.UpdateGraphs(guo);
But it is not cleaning all the area I want (somehow, it misses a few nodes around).
Thanks in advance.