Results 1 to 6 of 6

Thread: [Resolved]Getting angle of movement in radians via mouse

Threaded View

  1. #1

    Thread Starter
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913

    Resolved [Resolved]Getting angle of movement in radians via mouse

    Hey guys. I am really trying to wrap my head around this. What I am trying to get done is when the mouse is moved, I need to calculate the degree in radians it moved based on the local coordinate space of a sprite the mouse is moving. Basically I need to fire a bullet in that direction when I hit the fire button. I know how to animate it and all that, but just can't figure out how to get the radians based on mouse movement.

    Hope I explained that well enough. Think Geometry Wars as far as how I need to be firing the bullets. Any tips?

    I will eventually be using a 360 controller using the left stick for this, but for the time being I need to do this with a mouse for testing stuff at work where I don't dare bring in a game controller.
    Last edited by Cander; Dec 12th, 2006 at 12:13 PM.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width