Push enemy if get close enough to hit with arm

I’m not sure how to fix this because if I make my weapon range small it will push the enemy character.

sshot-2022-01-07-17-27-41

My enemy’s collider is as small as I can make it.

No fix from me, but man… that looks trippy.

1 Like

It kinda looks like a navmesh issue more than a collision issue, ok, maybe both, but the main issue probably lies on the NavMeshAgent settings of the attacker, you could look play with those and report back to see what happened.

1 Like

Take a look at the rigidbody for your characters. Make sure that they have IsKinematic checked. This tells the system that you want collission/trigger checking, but that you don’t want it to do any physics.

1 Like

I changed the kinematic but it still did it then I noticed the big green circle around them. The enemy and player had a navmesh radius of .5 (ngl not even sure if the enemy should have a navmesh) so when I put that down it started working. Thanks so much!

0.5 navmesh radius
sshot-2022-01-07-22-12-45

0.2 navmesh radius
sshot-2022-01-07-22-14-46

1 Like

Ah, yes, the agent needs to be scaled to the size of the model. Usually .5 is about right, but again, it depends on the models. I haven’t seen these ones before.

The enemy will need a NavMeshAgent, in a few more lectures, that enemy will start chasing YOU.

1 Like

These are my low poly character models from Grant’s low poly course!

1 Like

I actually double checked, we have the NavMeshAgent radius set to .3, so not too far off.

1 Like

Weird maybe I missed that? I usually follow closely so i’m surprised.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms