Forum rules - please read before posting.

Player's 2D circle collider is inaccurate, but any other way creates crazy spinning.

I'm using direct movement, so my character has a 2D circle collider at his feet and I have colliders placed around the scene. I'm using the default Brain as my player but he's got a circle collider at the bottom from some tutorial. The problem with the circle, is that it's pretty inaccurate to the shape of his feet, so when he walks his feet will stretch beyond the circle and thus clip in front of walls. If I expand the circle to avoid this, he won't be able to stand near anything too close to him top and bottom because of the circle shape.

I tried to replace the collider with a polygon so I could get a better shape, but without the circle, Brain just starts spinning in circles (with his feet / the collider at the center of the spin). What's going on here? How do I prevent Brain's feet from poking into things?

Comments

  • Could you share images to illustrate the situation, and what is your game's "Movement method" set to?

    The spinning sounds related to the Rigidbody 2D - check the Freeze Rotation option in its Inspector to prevent unwanted rotations.

    The use of Rigidbody and Collider components on 2D characters is often optional, though, depending on your settings and play-style. If you have a NavMesh, you can opt to have the character stick to it - even if you're using Direct movement. It's then just down to the shape of your NavMesh, which you can make "thicker" horizontally than vertically if it makes more visual sense.

  • Ah it was definitely the Rigid body, thanks as always. Didn't know I could use navmesh, maybe I'll see if I like that better but colliders should work fine now

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.