How to make 3d character animation stop on another object surface?

A 3d character punchs another character in scene, how to make sure its hand stop on another character’s chest surface, not inside.

Thats a pretty complicated problem. There are 2 ways:

#1 Just make sure the animation works. That requires that they be standing in just the right place when the animation starts, and that the animation does not poke through the other guy.

#2 Use IK and complex colliders. You’d start with a punch animation and then every frame test for intersection. Once you detect a hit you’d have to decide what to do at that point, and thats where it’d get ugly.

#3 You could possibly make the punching arm an additive layer and adjust the animation strength somehow to react just-right when you detect a collision.

Honestly I haven’t figured out how to set up a complex hit-box system yet so my suggestions are only rough ideas.

What you’re doing is asking how to solve an age-old problem in 3d graphics-- The fact that nothing has physical presence and you’re trying to do it on a dynamic, animating character. It can be done… Shadow of the Colossus and Last Guardian did it well, but that was the specialty of Team Ico. Perhaps wrestling and boxing games are good at it too.

1 Like

I’m a newbie and want to know the answer also.

The first question is, does Unity game engine have a potential to do it.

If the answer is yes. Then how to do it in appropriate way.

Mesh collider on chest and hand , Ontrigger to detect hand push on chest, stop hand animation when detected, but other body animation may need to continue because of “smooth animation”

It is what i think.

1 Like