Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Rotating Sprite Problem.

Author
Message
Byrdor
14
Years of Service
User Offline
Joined: 14th Aug 2009
Location:
Posted: 14th Aug 2009 23:30
Hello, I would like to rotate a sprite based on where the mouse is on the screen. My project is doing an arm on a body and the arm will rotate with the mouse position. Kind of like a pointer.

This is where I have left off recently:



The code above rotates the sprite 360 degrees around but does not rotate based on the Mouse Position. If there is a better way to do this I am all ears.
Byrdor
14
Years of Service
User Offline
Joined: 14th Aug 2009
Location:
Posted: 15th Aug 2009 01:42
Apologies for not looking...at least not hard enough.
I found an example that Winch did.

Thank you Winch.

Login to post a reply

Server time is: 2024-04-20 15:39:05
Your offset time is: 2024-04-20 15:39:05