×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    2

    Question Sprite rotation according to mouse posistion

    I've been searching google for quite a while now but have been unable to find anything explaining how to do it. I'm not very good at programming so I'm not able to think of how to do it off the top of my head. The game we are making is a top down shooter. My idea is that the mouse will be shown on the screen as a crosshair and the sprite will face that direction. Any help would be greatly appreciated.

  2. #2
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,777

    Re: Sprite rotation according to mouse posistion

    Quote Originally Posted by grimshaw9 View Post
    I've been searching google for quite a while now but have been unable to find anything explaining how to do it. I'm not very good at programming so I'm not able to think of how to do it off the top of my head. The game we are making is a top down shooter. My idea is that the mouse will be shown on the screen as a crosshair and the sprite will face that direction. Any help would be greatly appreciated.
    Hi grimshaw and welcome to the Forum !

    If you wish to implement this and trigger the crosshair accoring to the orientation of the device then you can use the accelerometer using AXYZ module, Also there is a Precise mouse controll with the N95 accelerometer which may give you idea how to do it.

    If you want to implement this without using the accelerometer then you could use stimulating keypress.

    Best Regards,
    Croozeus
    Pankaj Nathani
    www.croozeus.com

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    2

    Re: Sprite rotation according to mouse posistion

    I should have probably been more specific but this is a game for pc being made using pygame. Not sure if this is the right place for this but it seemed to me people here were very knowledgable so I figured id give it a try.

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: Sprite rotation according to mouse posistion

    Quote Originally Posted by grimshaw9 View Post
    this is a game for pc being made using pygame.
    As far as I know, pygame has not (yet) been ported to PyS60?

    If your question is about porting pygame to PyS60, then you might be out of luck. If your question was about using pygame in PC, then it was a nice try - but it might be better to ask again is some pygame forum

    Cheers,

    --jouni

Similar Threads

  1. BT GPS mouse not detected
    By ueffchen in forum Mobile Web Server
    Replies: 3
    Last Post: 2007-06-14, 13:07
  2. Is MIDP2.0 over Symbian OS slow?
    By epolitakis in forum Mobile Java Games
    Replies: 7
    Last Post: 2007-03-16, 09:32
  3. Sprite GameCharacter Movement & Sprite Deletion
    By bloodyknight in forum Mobile Java General
    Replies: 2
    Last Post: 2004-07-10, 02:34
  4. My Questions are not getting answered
    By earamsey in forum Symbian
    Replies: 1
    Last Post: 2003-06-04, 17:26
  5. Severe RResourceFile Error, HELP!
    By earamsey in forum Symbian
    Replies: 0
    Last Post: 2003-06-02, 19:34

Posting Permissions

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