Detect collision on certain area of an object

Hello,

I’m new to Unity and I have a question on game logic: I want to make a game where you can make a snow ball battle as throwing snow balls on each other.

How can I detect on which area of the models body is the impact of a snow ball?
How can I get the force that arises on the impact?

Thanks for help :slight_smile:

You’ll need to add a collider to the specific body part (or one that surrounds the body part).
I’m not quite sure what you’re asking about “the force that arises on impact”. If you have a rigidbody collider on both objects the impacted body will automatically have the correct amount of force applied to it. If you want to manually calculate this then that’s a bit more complex and I’d suggest cracking open some physics books.
Hope this helps.

You’ll want to use the OnCollisionEnter event, which is passed an instance of the Collision class. That class should contain everything you need including contact points, impact velocity, etc. Check out the docs here:

http://docs.unity3d.com/ScriptReference/MonoBehaviour.OnCollisionEnter.html