- Home /
Detect Hit on top of collider(head)
Id like to know the easiest and/or most efficient way to detect if a player's head was jumped on(to be killed e.g mario).
Answer by Wolin · Jul 04, 2012 at 08:56 AM
Why not to create another child gameobject with collider attached to it? Just make a gameobject 'head' with a sphere collider and put it as a child object of your player's body.
Answer by shahinexir · Aug 20, 2012 at 11:54 AM
hey , im having the same problem as yours. im making my first project as super mario. and dont know how to fix it . did u fixed it ? pls help me . tnx
basically detect when the collision happens and check to see if the players y coord os higher than the enemys y coord plus whatever ever offset you like
Your answer
![](https://koobas.hobune.stream/wayback/20220613073702im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
My Player keeps launching into the air 4 Answers
Need Scripts for wall forward to behind and climb 0 Answers
Making character to fly 1 Answer
Trigger Rigidbody with CharacterController 0 Answers
Ragdoll's big head collider 3 Answers