I have enemies that are constantly approaching my player. I want to be able to swipe across them with a finger to, essentially, cut them in half. For now, as long as they disappear, that's fine. I can figure out how to do death animations later.
So far, I have:
function OnMouseUpAsButton ()
{
Destroy(gameObject);
}
Which works great for tap killing. But I need swipe killing. Any advice? I've read a bit about raycasting but I'm not sure if that's what I need. Any help is appreciated!
↧