Download

How to make melee attacks react to static mesh collision

Im developing a game with large scaled enemies such as trolls/giants. I thought about how I might design melee attacks in order to “fake physical animation” using a collision detection with a static mesh and using an IK chain to keep the hands on the weapon during a reaction animation.
For example: the enemy attacks with a downward swing, colliding with the ground.
The animation is stopped and the hands are “IK’ed” to the weapon handle.
Would this be the proper way to solve the problem of weapon collision, or am I overthinking this?

I think you may be the only one to understand what you want to do the way it’s currently explained.

To get a hit reaction you need a physical animation of some sort.
Or maybe an hit reaction animation.

Either way something has to cause the skeleton to move.

On its own, enabling physical animation will already react to collisions.
Since that’s your title, I guess that could be your answer?

Maybe that is the best solution. I was worried about large scaled models causing visible jittering and whatnot, but maybe I need more confidence in physical animation

You can fine-tune the amount of “give”.
And the amount of solves/iterations.
It should be enough to prevent visible shaking on most models - but yes, scaling up has a chance to render it more noticeable.

If you plan to use chaos this could potentially be a problem. In physx I have never had issues with it personally.

Full ragdoll can twitch. But full ragdoll is also not a good way to go about things since bodies don’t fall limp like a rag doll…

So I guess all I do is keep the weapon parented to the hand and use physical animation for both the AI and the weapon. Is there any good physical animation tutorials, most just used derpy show of physics. I couldn’t find any resources that show a basic use of using the animation but react to objects realistically

Not really because 90% of the time you need a combo with predictive animations on top of a light physical animation to go for that AAA quality you see in most games.

The 1hour plus live training talk (at x2 speed) on physical animation to get a good bearing on settings, profiles etc. Is probably a good place to start.