2
\$\begingroup\$

My character can walk around in the world, but walks through other objects, for example a cylinder (stand-in for a cannon). To fix this I added a capsule collider to each of the character and cylinder, but that wasn't enough. Apparently I have to add a Rigidbody as well. [1] [2]

When I add a Rigidbody to either one, they collide as expected. However, when I add a Rigidbody to my character, it falls over when I move forward. When I add a Rigidbody to my cylinder, other functionality fails (it is supposed to shoot cannonballs, and they act strangely). If I enable Kinematics on either, they stop colliding.

Is there any other way to make the character and cylinder solid with respect to each other, without breaking existing non-physics functionality?

\$\endgroup\$
2
\$\begingroup\$

Add a character controller and use controller.move() with this you can make your character don't walk through the walls, if this wall have a collider.

\$\endgroup\$
1
\$\begingroup\$

You can freeze rotations of a Rigidbody.

\$\endgroup\$
  • 1
    \$\begingroup\$ (Please refrain from link only.) \$\endgroup\$ – Vaughan Hilts Apr 11 '14 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.