Home | Rules and Guide | Sign In/Create Account | Write a Post | Reddit | #LD48 | #ludumdare on irc.afternet.org (Info)

Ludum Dare 29 — April 25th-28th Weekend [9 PM EST] — Theme: ??? (Theme Voting!)
  • Ludum Dare 29 Compo (48 Hour+Solo+Scratch+Src) Begins: in 5 days, 11 hours, 41 minutes, 7 seconds
  • Ludum Dare 29 Jam (72 Hour+Teams OK+Relaxed) Begins: in 5 days, 11 hours, 41 minutes, 8 seconds
  • [ MiniLD 50 | Warmup Weekend April 19th-20th | Real World Gatherings | Ludum Deals | Wallpaper ]


    And another math problem…

    Posted by (twitter: @petterroea)
    December 17th, 2011 10:24 am

    I have allready had one problem, but here comes another one! I want a image to rotate 20 pixels from a center coordinate, based on degrees in the rotation. This so i can make a muzzleflash. How do i do that? I am only 13 yrs old, so school hasn’t covered this stuff yet :(

    3 Responses to “And another math problem…”

    1. digital_sorceress says:

      It depends on how you’re drawing sprites.

      Mathematically, you’d move the image 20 pixels so that the rotation centre is at the origin, then rotate, then add the 20 pixels back again.

    2. handuel says:

      Im 13 as well :D i tought myself java at home. Came here to make a game and(never)… I’m failing

    Leave a Reply

    You must be logged in to post a comment.


    All posts, images, and comments are owned by their creators.

    [cache: storing page]