I have a big problem that is what kind of method to do is the best. I have try the onControlColliderhit before...but it seem not detect so well So I think how about using raycast. But someone tell me that I can use trigger to detect enemy come inside my attack area. Then the problem is I dun want my character and enemy can run pass though each other. Then what can I do. And I want to know how to script on javascript.
http://www.burgzergarcade.com/hack-slash-rpg-unity3d-game-engine-tutorial
go from 3 - 7 :) that gives a basic enemy AI and melee attacking scripts but these are in c#