Forum rules - please read before posting.

A function so that the curser stays in place when the camera moves.

Its hard lets say to hit something you want to interact with when the camera is moving because the curser doesn't stay in its original position. 

Here's an example of the curser moving. 

It might seem like something that is a natural occurrence, but I've seen games where the curser dont move and Im sure this feature would be good for people doing sidescrollers with moving cameras. 

Comments

  • Aside from the complexity involved, I think the main issue would be working out where the cursor "sits" in 3D space - specifically it's depth.  Would it be in line with the player, the far wall, some arbitrary point?
  • Im not sure I know how to answer that... I dont really know what solves the problem since i dont know how the curser logic is. I think the curser just needs to stay in the position of the mouse no matter what. Here's an example of a curser staying in place when the camera moves. 


    note: look at the little hand moving, not the curser at the center of the screen ;) 
  • But see: that's a 2D scroll.  The game might be in pseudo-3D, but the camera shifts without changing it's perspective, unlike your first gif.  The question I wasn't asking wasn't a technical one - that'd be for me to (potentially) worry about.  What I was getting at was the behaviour - which would be a design decision.

    It's easy to determine where the cursor in the 2nd gif should "stick" to because the perspective doesn't shift.  The same cannot be said for the 1st.
  • Ahh. I didn't think about that fact. 
    To talk about the design, If the curser sits on the floor where all the interactable elements are I guess that would solve my problem since thats the only reason for my problem.- Its only annoying because its hard to hit the objects you are passing by with the mouse. Another thing that might solve it for me would be if the curser could snap to whatever hotspot you hit until you move the mouse into another position. 
  • edited April 2016
    Mouse-snapping is an entirely different request.  And since your interactable elements are spread out over 3D space (i.e. different depths), where on the floor would the mouse sit?  Perhaps an intensity slider per-camera would be appropriate.  These questions might sound pedantic, but what you're asking for is a very complex addition.
  • Okay. I can shape my game to make this less of a hazzle of cause. 
    Then I have a question for you... If I click something like a menu, and start walking away from it. Is there a way to just hide the menu like when i click somewhere else with the mouse? Right now I have set the menu to have a lifetime, but thats not really what I want. 
  • A custom script could be used to detect mouse clicks, and turn off the Menu in question if the mouse is not over it:

    AC.Menu myMenu = AC.PlayerMenus.GetMenuWithName ("MyMenu");
    Vector2 invertedMouse = KickStarter.playerInput.GetInvertedMouse ();

    if (Input.GetMouseButtonDown (0) && !myMenu.IsPointInside (invertedMouse))
    {
      // Clicked but not inside menu, so turn off Menu
      myMenu.TurnOff ();
    }
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.