User Tag List

Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 21 to 30 of 40

Thread: Containing mouse cursor to a circle around the hero

  1. #21
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)

    Join Date
    Sep 2017
    Location
    Milano, Italy
    Posts
    130
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mightyenigma View Post
    clamped means you limit the value like a combined max and min, so that you take the max between 0 and the relative position, as well as the min between 150 and the relative position.

    The actual mouse cursor will be hidden. The crosshairs will be positioned at the hero's position plus the mouse's distance from the mouse starting position (sometimes called the mouse delta), but limited to that circle.

    if the distance from the character to that offset that positions the crosshairs is going to be greater than 150, you can limit it using trig functions to keep it within that circle. there's a few ways to do this but one i was thinking of involves finding the angle between the crosshairs and the hero (like with the arctan2 function or whatever CTF uses). you can use that found angle, putting it into the cosine and sine functions to constrain it to that circle.


    Sent from my iPhone using Tapatalk
    This is my same idea, but in my last post I was not able to express it very well due to language problems, sorry.

  2. #22
    Clicker Fusion 2.5iOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    SolarB's Avatar
    Join Date
    Feb 2012
    Location
    Melbourne
    Posts
    904
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mightyenigma View Post
    clamped means you limit the value like a combined max and min, so that you take the max between 0 and the relative position, as well as the min between 150 and the relative position.

    The actual mouse cursor will be hidden. The crosshairs will be positioned at the hero's position plus the mouse's distance from the mouse starting position (sometimes called the mouse delta), but limited to that circle.

    if the distance from the character to that offset that positions the crosshairs is going to be greater than 150, you can limit it using trig functions to keep it within that circle. there's a few ways to do this but one i was thinking of involves finding the angle between the crosshairs and the hero (like with the arctan2 function or whatever CTF uses). you can use that found angle, putting it into the cosine and sine functions to constrain it to that circle.


    Sent from my iPhone using Tapatalk

    This is essentially what my example does. I didn't know you could limit using the mouse object, that's worth a try!

  3. #23
    Clicker Fusion 2.5 Developer
    PBarwick's Avatar
    Join Date
    Jul 2014
    Posts
    390
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    For what it's worth, in my game I just made a separate control scheme for mouse and keyboard vs twin stick controller. I found it more intuitive to move the mouse freely around the screen and shoot at a specific location for mouse and keyboard controls. But maybe I am strange, haha

    I did of course hide the mouse pointer and display a little crosshair

  4. #24
    Clicker

    Fusion 2.5Android Export Module

    Join Date
    Jan 2007
    Posts
    281
    Mentioned
    8 Post(s)
    Tagged
    1 Thread(s)
    Crosshair Limit.mfa

    Threw this together in a few min. Holding - - = or + will increase/decrease radius.

    Sorry for no comments - in a hurry and have to leave soon.

  5. #25
    Clicker Fusion 2.5

    Join Date
    Oct 2007
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by GamesterX23 View Post
    Crosshair Limit.mfa

    Threw this together in a few min. Holding - - = or + will increase/decrease radius.

    Sorry for no comments - in a hurry and have to leave soon.
    Thanks for your help, but this doesn't solve the mouse pointer/crosshair disconnect issue.

    Is this really impossible?

  6. #26
    Clicker

    Fusion 2.5Android Export Module

    Join Date
    Jan 2007
    Posts
    281
    Mentioned
    8 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by bhlaab View Post
    Thanks for your help, but this doesn't solve the mouse pointer/crosshair disconnect issue.

    Is this really impossible?
    I'm not on my pc so I only have the free edition of fusion. Does the mouse object not work?

    Why do you need this to be so specific? There is literally zero reason to map the windows mouse cursor.

  7. #27
    Clicker Fusion 2.5

    Join Date
    Oct 2007
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by GamesterX23 View Post
    I'm not on my pc so I only have the free edition of fusion. Does the mouse object not work?

    Why do you need this to be so specific? There is literally zero reason to map the windows mouse cursor.
    1. I want the crosshair to be limited as a matter of the game's difficulty and design. I want the player to have to aim their shots rather than just point and click on their targets.
    2. I need the controls to be responsive. If at any point there's a delay between the player moving the mouse and the crosshair moving the direction they've pointed the mouse, that is unresponsive and affects the basic playability of my game. If I can't get this working right, there's no point to anything else IMO.

  8. #28
    Clicker

    Fusion 2.5Android Export Module

    Join Date
    Jan 2007
    Posts
    281
    Mentioned
    8 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by bhlaab View Post
    1. I want the crosshair to be limited as a matter of the game's difficulty and design. I want the player to have to aim their shots rather than just point and click on their targets.
    2. I need the controls to be responsive. If at any point there's a delay between the player moving the mouse and the crosshair moving the direction they've pointed the mouse, that is unresponsive and affects the basic playability of my game. If I can't get this working right, there's no point to anything else IMO.
    What? That makes no sense. Why would there ever be a delay? Do YOU even know what you're trying to accomplish?

    As it stands the example I gave you accomplishes exactly what you asked about - at least the way you described it.

  9. #29
    Clicker Fusion 2.5

    Join Date
    Oct 2007
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by GamesterX23 View Post
    What? That makes no sense. Why would there ever be a delay? Do YOU even know what you're trying to accomplish?

    As it stands the example I gave you accomplishes exactly what you asked about - at least the way you described it.
    You don't need to be rude, especially since I've explained this multiple times in detail. Perhaps this would be best described with an illustration


  10. #30
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    679
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    The best I can interpret this is that bhlaab wants the crosshair to be an independent object that is "shoved" by the mouse position delta as opposed to orbiting it using the standard method, and limited to a circle boundary around the player at all times. Very odd; I haven't heard of any type of control like this in a game before.

    When the mouse leaves the boundary and widens the "deadzone" he's referring to, he wants the crosshair to be shoved away from the mouse as the mouse re-approaches the boundary. The problem i'm seeing with this is that you'll shove the crosshair to one side of the boundary, but then it would snap instantly back to the mouse once the mouse actually is within the boundary.

    Unless he just wants the crosshair position moved around by the mouse delta only and not defer to the mouse position when it is inside the boundary?

Page 3 of 4 FirstFirst 1 2 3 4 LastLast

Similar Threads

  1. Mouse Control and mouse cursor
    By DEKE15 in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 4th December 2016, 10:38 PM
  2. Replies: 1
    Last Post: 11th October 2016, 05:44 AM
  3. mouse cursor
    By SpaceBuddy in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 8th April 2010, 10:41 PM
  4. invisible mouse cursor
    By librarysprite in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 30th December 2008, 05:17 PM
  5. Replies: 0
    Last Post: 10th January 2008, 06:45 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
  •