Local Avoidance in a 2d world (x, y)

i just purchased the pro version of the this and need a little help local avoidance. when using just pathfinding without local avoidance i do not use a character controller, i use this code: ` public override void Execute() {
if(hasTarget && !waitingForRepath && Time.time >= nextRepath) {
StartRepath();
}
if(path == null)
return;
if(pathIndex >= path.vectorPath.Count) {
DestinationReached();
return;
}
if(!walking) {
destination = path.vectorPath[pathIndex];
walking = true;
} else if(Vector2.Distance(character.position, destination) < accuracy) {
if(++pathIndex < path.vectorPath.Count)
destination = path.vectorPath[pathIndex];
else return;
}

    Vector2 direction = (destination - character.position).normalized * character.speed * Time.deltaTime;
    character.position += direction;`

my question is do i have to use a RVOController in order to have local avoidance work or can i just register my agent with the simulator? also to note, on my character i have a bounding box around my sprite PLUS a FOV sphere collider for vision and i only use the x and y for movement.

You can, but it would require writing a script that does the same thing at the RVOController~ Get info from the simulator, change speed… and so on

So, id say use the RVOController, just pop it on and change

`character.position += direction;
//Too
public RVOController RVOController;
RVOController = This.GetComponent()

RVOController.Move(direction);
`

Note: You don’t need to use delta time with the RVOController, it does that for you :slight_smile:

Also, just something I figured out for my self~ The best way to keep your units looking Forward with the RVOController is by looking 180º away from the last position (At high frame rates you want to Interpol this FYI or it will sometimes Twitch )