Results 1 to 1 of 1
Thread: Rotating image to mouse problem
- 10-05-2012, 10:55 PM #1
Member
- Join Date
- Mar 2012
- Posts
- 53
- Rep Power
- 0
Rotating image to mouse problem (Solved)
I'm making a tower defense game that is going to shoot a laser at a monster but I'm having a hard time aiming the tower towards the monster. I've been looking around for a code that will make this work but the only one i've found is "Math.toDegrees(Math.atan2(yEnd-yStart,xEnd-xStart))" and this is not working for me. The tower is rotating to much.
Here is a video demonstation:
Any help would be appreciated!
Take away Math.toDegrees made it work :DLast edited by totalspelnerd; 10-05-2012 at 11:52 PM.
Similar Threads
-
Image Rotating Around Mouse
By altosaxplayer88 in forum Java 2DReplies: 2Last Post: 06-01-2011, 02:36 AM -
Help with Image Rotating?
By Leospaceman in forum Java 2DReplies: 2Last Post: 05-31-2011, 02:48 PM -
Rotating Buffered Image distorts image
By VortexSpin in forum Java 2DReplies: 1Last Post: 02-13-2011, 05:54 AM -
Rotating an image
By lackofcolor in forum Java 2DReplies: 3Last Post: 02-27-2009, 11:54 PM -
Rotating Image?
By sciguy77 in forum Java AppletsReplies: 9Last Post: 02-17-2009, 01:47 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks