Quantcast
Channel: Questions in topic: "enemy"
Viewing all articles
Browse latest Browse all 1488

Swipe to kill enemy? 2D

$
0
0
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!

Viewing all articles
Browse latest Browse all 1488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>