I’ve been trying to figure this problem out for a week now and haven’t found any solutions.
I have a NPC with colliders attached to different bones using Unity ragdoll wizard. They’re supposed to be targets for a Physics.raycast projectile. Except, the raycast will go through some colliders depending on the animation the NPC is performing. The NPC is using a Mecanim Animator Controller.
From my research, the problem appears to be that despite the colliders appearing that they’re moving with the animation in the game window, they’re not really synced in the physics engine.
I’ve tried everything I can think of to fix this. I tried changing the fixed timestep, tried all sorts of sizes and shapes for the colliders, the colliders all have rigidbodies set to kinematic, the Animator Controller has Animate Physics checked, etc. The closest I have gotten to accurate raycast hits is changing the colliders rigidbody to interpolate but this obviously completely messes up the animations and can cause tons of deformations.
Does anyone have any thing to share or any experience dealing with this? I’ve seen multiple topics and questions dealing with the exact same issue but no responses. The only thing I can conclude now is that it’s not possible in Unity to accurately fire raycasts at colliders attached to a Mecanim character.
This is exactly what I wound up figuring out a while ago. Stumped me forever lol. But thank you for your very helpful reply!
– DelenadeleonNo problem, hopefully others can find some use from this info!
– Coffle