Should I avoid using RigidBodies and Colliders and opt for Raycasts?

Hi,

Love this asset. I’m currently trying to decide how my RTS units will determine if they are next to their target and ready to attack.

Right now I went with the RigidBody + Collider method but it doesn’t seem like a good route. Currently I have one small collider out in front of my character that is affected by physics. So if people walk in front of him he gets pushed around. It also takes precedence over the AI Path collider in terms of physics (where my player stands on the ground, for example).

My thought was to just use Raycasts at this point. Is this a better way to add distance logic and get events to trigger attacks when using this asset?

I’m open to other ideas too. Semi noob here. I’ll ask this as well… the A* AI Path collider doesn’t have functionality I need, does it?

Hi

For an rts I would definitely recommend not using a rigidbody + collider method. It will be slower than what you can do in other ways.

Raycasts are better I think.

You might also be interested in https://arongranberg.com/astar/docs/local-avoidance.php.