Correct way to use colliders for humanoid characters : Unity

Viewed 615

So I have a human character with a sword and some barrels in my scene. I have written a script for shattering barrels with the sword. I am using character controller on character (so no rigidbody component) and capsule collider (with rigidbody component) for barrels.

But when the character moves closer to the barrel it just floats in the air after colliding to it and stays there as I'm not using rigidbody component for the character. How do I fix this problem?

What is the correct way of handling colliders for humanoid characters?

1 Answers

There is a detailed explanation on how to handle Character Controllers and Physics Objects on the Unity Manual Page. If you dont want to read there are also videos provided by Unity on their youtube channel. Maybe start with reading the documentation on https://docs.unity3d.com/Manual/CharacterControllers.html

Related