I'm having difficulties making the collision work correctly on my Player character.
Circle Collider 2D seems to work, but it's not the best fit for the perspective of my game as I'd like an oval collider.
Using Capsule Collider 2D or Polygon Collider 2D, both give me the following problem where the player sometimes begins to rotate on a collision like this video: https://streamable.com/6zb4ge
In the manual it says to have Trigger checked, but I can only get collision to work by having it unchecked. I have the collider on the sprite object, not on the root, but I've tried both. These are my setting for colliders, I've tried all options here I believe, but still the problem persists: https://imgbox.com/3uddRDdC
Also, is there a way to stop the player walkcycle upon collision so it defaults back to idle? Currently my player just keeps walking on the spot as if trying to muscle his way through the NPC.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
If you do need true collision, you'll need to lock rotation in the Rigidbody.
What objects are they typically colliding with? Unless your game has special requirements, true collision isn't typically necessary and instead the player's movement range is set purely by the NavMesh.
If the collision is to do with other NPCs, the Navigation Mesh component has evasion options to prevent characters intersecting with one another.
Ah yes, it was the freeze rotation on Rigidbody that did the trick. Thanks, Chris.