I have an enemy in my scene where I want that when I shot in a certain part of the body like the head, for example, the damage is greater than if he gave in the feet, in few words in some parts I will quit more and in others less.
But I want to know what do you need to do in the enemy and where the script has to be and how have to be the scripts.
I really help. Please someone help me.
Thaks for future.
I would use a custom made low-poly collision mesh for each of the different damage areas, Or perhaps one for each body part then you can also make multiple body part versions to show localized damage.
i made a system which consists of enemies with 3 different parts of the body with red color
(1)if the player hits the red colored part, the enemy takes damage.( till this it is done)
(2)if the player hits the non-red colored part twice, i want to spawn another enemy at the same spot ( i have no idea how this will be done).
I have used rays to detect my enemies red colored part by getting the hitinfo and comparing the tag with enemy and using the isTrigger method to detect the red part
to instantiate i have used two spawning points which spawn 3 different types of enemies every 7 secs