The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 12 of 12

Thread: Constraining movement by radius

  1. #1

    Constraining movement by radius

    This doesn't look pretty or accomplish anything groundbreaking, but may come in handy for someone looking to constrain the movement of something like the crosshairs in a game.

    I am working on a game (play my finished games HERE) and wanted to constrain the movement of the mouse controlled crosshair to a certain radius around the player. Since it gave me difficulties I figured I'd post a simple demonstration of my solution.
    Attached Files Attached Files

  2. #2
    Thats sweet. I made a Joystic using the same concept. Nice work.

    XBOX LIVE GAMERTAG: Icr125riderI


  3. #3
    Quote Originally Posted by cr125rider
    Thats sweet. I made a Joystic using the same concept. Nice work.
    Thanks! Did you make a visual representation of a joystick or did you use a joystick to control your game? I would be intrested in knowing how to program a joystick control in flash. Ironically, I used to be able to do it in Basic on a Commodore 64 (back in the day!). However, I was unaware that it was supported in flash.

  4. #4
    I like it. Is it laggy because of trigonometric math calculations or is it just an fps thing?
    Formerly GWing_02

  5. #5

    Is it laggy

    Quote Originally Posted by GWing_02
    I like it. Is it laggy because of trigonometric math calculations or is it just an fps thing?
    I would assume it is because of the math. However, I haven't experienced any lag on my machine. It runs at 1.5 ghz.

  6. #6
    very nice. Definatley something that could come in handy.
    Jerez_z Prime
    jStudios - Yay google pages! God I'm Lazy....

  7. #7
    I'd say FPS issue. Runs choppy for me on a 1.8 ghz.
    Here's that Joystic thing.
    Attached Files Attached Files

    XBOX LIVE GAMERTAG: Icr125riderI


  8. #8
    cr125rider, that is sweet, could I see the fla for that?
    Build a man a fire and he is warm for a day.
    Set a man on fire and he is warm for the rest of his life.

  9. #9
    Here you go!
    Attached Files Attached Files

    XBOX LIVE GAMERTAG: Icr125riderI


  10. #10

    I like it

    cr125rider - Cool example! I especially like the way the joystick springs back when you release it. Thanks for posting it along with the fla.

  11. #11
    No Problem

    XBOX LIVE GAMERTAG: Icr125riderI


  12. #12
    The joystick is awesome. Thanks for posting. I'm gonna fiddle around with it when I get a bit of free time.

    Seven Room Studio
    : Kirupa Nintendo Cult Member 32 :

    TheVanguard - My band - We're currenly looking for a singer/frontman

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012