- Home /
Question by
DissonanceMask · Feb 24, 2019 at 10:39 AM ·
spritefollowmouseposition
how to have a sprite follow the spot of my mouse cursor.
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.
Comment