Quantcast
Channel: Questions in topic: "follow"
Viewing all articles
Browse latest Browse all 536

how to have a sprite follow the spot of my mouse cursor.

$
0
0
I'm trying to make my mouse move a sprite around. All I have so far is: void Update() { float mousePosition = ???? Vector 2 spritePos = new Vector2(transform.position.x, transform.position.y); transform.position = spritePos; } anything I try, for linking the mousePosition, keeps saying i'm incorrect. I'd like some help from the experienced.

Viewing all articles
Browse latest Browse all 536

Trending Articles



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