Raycast really isn't that expensive, do a quick implementation and see how the performance is.
i did put raycast on zombies and put it so that it fires every 30 frames... its not that bad, and i think i could get away with it... but you know if there is a better, more optimized way, i would prefer to do that instead...
If your game is running on a 2D plane setup you could just make the melee activate if an enemy is within a certain distance (x coordinate), rather than raytracing.
well yes thats what i've been asking all along... what would be any different ways of doing it without raycasting...
the problem is, i wont just have linear movement on x coordinate, i will also have movements on itween paths... diagonally etc...
so i think the best way would be that if collider hits with human collider, then do attack... i just dont know how to accomplish that...
first you start with trigger event, then when it triggers, go into some attacking state, but then when target dies, it needs to send some event to zombie that it died, so that zombie keeps on walking right? and im not really sure how to do that... im still learning playmaker
i will try to do that now, if anyone has some tips or knows how to do it, etc... im all ears