Hey guys,
Does anyone know how to get colliders working when using RVO? I have a large sphere collider as a child object, and i need it to detect unit everytime one enters into its radius. So far I have this:
void OnTriggerEnter(Collider Slime)
{
print(“Slime Collision!”);
}
but it wont detect when a slime enters into the radius. All the units have the same collider attached, and they are all set to IsTrigger = Yes.
Any ideas?
Hi
You might have to add a kinematic rigidbody to the objects. This is explained in Unity tutorials (see https://unity3d.com/learn/tutorials/topics/physics/colliders-triggers or https://docs.unity3d.com/ScriptReference/Collider.OnTriggerEnter.html).
However depending on the movement script you might have to modify the movement script slightly to keep the old behavior (many of the movement scripts will switch to using rigidbody.AddForce when a rigidbody is attached, which may not be what you want in this case).