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 Answers 2

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
  • 1
    \$\begingroup\$ (Please refrain from link only.) \$\endgroup\$ Apr 11, 2014 at 10:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .