[SOLVED] RVO Custom Local Avoidance Speed is zero

HI!

I have been trying to use your RVOController script, and are following your “Custom Local Avoidance” guide.

I have a problem where the delta returned is always 0.

This is how I call the method

I looked into your code, and found that the speed from CalculatedSpeed is also 0.

I am setting the default speed to 10 and the max to 12 above, so I guess there is some way CalculatedSpeed is made that I cant figure out.

Any thoughts?

Hi

Do you have a RVOSimulator component in your scene?

Yes, this is the current setup for it. It is on one of the managers in the scene preload.

image

Just to be clear, when I use the basic example, everything works fine, but there is a problem when I try to implement the same functionality in my game.

I strugle to find the reason for the CalculatedSpeed to be zero, even though it is set to 10 before the call

Does the RVOConroller component need to be added before the game starts?

Hi

The RVOController does not need to be added before the game starts. Are you sure your target position is different from the agent’s position?
Are you getting any errors?

Fixed the issue!

Seems like some of my code set enabled to false on the RVOController before I intended.

Could maybe be nice with a warning togheter with this event?

Thanks for help!

1 Like