Results 1 to 2 of 2
  1. #1
    Daslee's Avatar
    Daslee is offline Member
    Join Date
    Mar 2012
    Plunge, Lithuania
    Rep Power

    Default Image rotation to another image

    Hello. Im trying to make a game like tower defence, i think someone knows how that games looks. So now i need to make that my laser shooter automatically rotates to moving enemies, laser shooter is from image so im drawing it like that:
    Java Code:
    AffineTransform affineTransform = new AffineTransform();
    g2.drawImage(tank_head.getTexture(), affineTransform, this);
    As you can see there are already added rotation by angle, but i need to know how to rotate it to another image which is moving. And also maybe someone knows how to put that image with rotation to desired location by x and y?

    EDIT: Fixed.
    Last edited by Daslee; 06-06-2012 at 08:08 PM.
    Sorry for my bad English.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: Image rotation to another image

    Moved from New to Java

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Image rotation problem, plz help
    By brigadier90 in forum Java 2D
    Replies: 5
    Last Post: 01-15-2013, 01:01 AM
  2. Replies: 1
    Last Post: 07-28-2011, 09:48 AM
  3. Java - Image Rotation - How to use this code?
    By cvillejin in forum New To Java
    Replies: 1
    Last Post: 04-03-2011, 08:38 PM
  4. Image Rotation
    By mix99 in forum AWT / Swing
    Replies: 1
    Last Post: 02-24-2010, 11:25 AM
  5. Replies: 0
    Last Post: 01-08-2008, 06:29 PM

Posting Permissions

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