- Home /
Box colliders don't collide
I've added a box collider to my prefab but fighters can still pass through each other. isTrigger on both is set to false. The move animation moves the fighter i.e. I'm not altering the fighters' position through code, may that be the reason why it's not working?
Edit: adding a rigid body does seem to detect the collision but fighters don't react naturally when it happens. I just want to avoid passing through, don't want any physics acting upon them on collision.
if the animator is driving their position, is he cofigured to use physics time step?
Thanks for commenting. I'm sorry to ask this, I'm new to Unity... where can I check that out?
It wasn't, but I configured it now and I'm still getting same results.
as it turned out, I wasn't right either. the answer here is prity neat: https://forum.unity.com/threads/collisions-with-root-animation-movement.153556/
Answer by NoDumbQuestion · Jul 04, 2018 at 01:54 AM
Any Collider inside "root" of humanoid character will be controlled by animator. It will collide with nothing as long as the animation still running.
I have lots of collider for body and sword. But as long as the animator is running. Nothing will collide with anyone unless the character is dead and animator is turn off(then bone collider will start working even when they are already enable). Rigidbody is turnoff(reset free).
You must have to set Capsule collider along with animator for character collider to work.
Your answer
Follow this Question
Related Questions
Detect if a non-trigger collider is inside another collider 1 Answer
Bullet/Projectile Collision Question 2 Answers
Audio trigger when FPS walks into things, walls, doors etc 0 Answers
Best method to make the main character traverse multiple layers of objects using Unity 2D 1 Answer
Translating an object along a line until it collides with other objects 1 Answer