- Home /
Question by
DubstepDragon · Feb 25, 2013 at 06:47 PM ·
c#enemyattack
Damaging enemies...
What is a possible way to cause a number of attack points to an enemy via collision? Can this be in C#?
Thanks in advance!
Comment
Best Answer
Answer by poncho · Feb 25, 2013 at 07:09 PM
yes, it can... in c# or js add the OnCollisionEnter method to your object, add a colider and if other object's collider enter the collision zone of your object, it will trigger the method, then you could modify your enemy life the way you want.
good luck, any question google "oncollisionenter unity", everything is very well explained in unity documentation.
Your answer
Follow this Question
Related Questions
A way to create an invisible circle for the enemy? 4 Answers
How to optimize boat rotation 1 Answer
3D Gravity towards one object 3 Answers
Attack Enemy if looking at C# 2 Answers
Simple Attack Script Problem 2 Answers