Hey,
If this isn’t the right place for this, my apologies. I’m trying to do a very simple thing (I think its simple?) of attaching colliders to a characters bone structure so they move as he moves. However, when I play an animation (using mechanim), raycasts stop working properly against those colliders. From what I read, this has to do with FixedUpdate and physics, and setting the animator.updateMode to AnimatePhysics is supposed to fix this. However, even when I set updateMode to AnimatePhysics, my raycasts are going straight through any colliders that have moved because of the animation. I’ve spent a whole lot of hours trying everything I can think of, surfing the web, tracing my raycasts, etc etc … I can’t figure this one out. I’ve done the whole bit about setting it to AnimatePhysics through code and not through the editor (as one post said), etc etc … I’m at the point of trying strange things!
All I’m trying to do is have discreet hitboxes on each limb for a FPS. Think fallout … if you hit a limb, it can damage it, have a different effect, etc. I never imagined just getting my raycasts to work right was going to be the dealbreaker here … the rest of everything is coming alone fine since I actually understand whats going on.
Anyway, I would really appreciate some help here, since I’ve exhausted my googling on this and I don’t know where else to turn. I can’t be the only one to want to do something like this, and it doesn’t exactly seem absurd … so what am I doing wrong?
An example of one of the colliders … the hand doesn’t actually need a rigid body, I only added it when I did my barage of tests.
The majority of these colliders were created by the ragdoll option. I added a few more capsules to things like the hands and feet. If I don’t have the character animate, all hitboxes work. As soon as I turn on the animator, anything that has been moved out of place by the animation is no longer hit.
Again, thank for your help, whoever does answer … I’m at my wits end!