1
vote
2answers
83 views

How can I fix my sprite being rotated 90 degrees more than toward the mouse?

I am trying to get a Sprite in LibGDX to look at the player's mouse. Here's the code I have (mind you, I am using JRuby): target = mouse_position.sub(spatial.position) rotation = ...
5
votes
1answer
571 views

Isometric - precise screen coordinates to isometric

I'm trying to translate mouse coords to precise isometric coords (I can already find the tile the mouse is over, but I want it to be more precise). I've tried several different methods but I seem to ...
3
votes
3answers
2k views

How do I shoot bullets towards the mouse in a top down shooter?

I have a formula for pointing my main character of the game towards the mouse, and it gets the angle he needs to be turned to point towards the mouse. But how do I get the bullets from the gun to use ...
2
votes
1answer
655 views

Allegro 5 Mouse Look

I found good tutorial on how to do mouse look for 2D game here: http://www.atburrow.com/2010/03/08/objects-facing-the-cursor/ My code looks like this: w = (double)mouse_x - (double)pos_x; h = ...