Forum rules - please read before posting.

Camera following cursor

I built my own point/click interface for a first person game. It's working great, except that I have "NONE" selected for movement type in the settings manager. I tried choosing the built in point/click movement type, but couldn't get it working in first person mode and without pathfinding (a long story, but I didn't want to use pathfinding).

Anyway .. it is working great with the cursor unlocked, but when I lock the cursor, the cursor is stuck in the middle of the screen and not tracking the mouse.

I saw the camerainfluence class .. but, can't seem to set followCursor to true.

How can I get the cursor locked and the cursor following the mouse?

-Ken W

PS Chris -- haven't talked to you in a while. The project is going great. We've learned a lot since we last spoke...

Comments

  • edited July 2021

    Glad to hear it, and good to hear from you, Ken!

    If the cursor is locked, in AC terms, it shouldn't be able to move and will default its position to the centre of the screen. It sounds like things are working as intended, at least from AC's side of things.

    What is the underlying intent here? To prevent the ability to rotate the camera, or "free-aim", as opposed to prevent movement by the cursor itself? If you're First Person movement, you can do that by using the Player: Constrain Action and locking the free-aiming option.

    However, if you're using a custom movement system, you can update the "free-aim lock" through script with:

    AC.KickStarter.player.freeAimLocked = true/false;
    
  • Chris -- I couldn't get it to go. I sent you the source via email... (and, a video showing what I'm trying to do) -- basically, I just want free aim and can't seem to get it going. It should be something super simple .. I'm not sure what I'm missing.

  • Chris -- you can ignore the email I sent you .. I found a workaround .. a bit of a hack .. but, works. I set the movement type to FirstPerson .. until I'm ready to move .. and then I set it to "none", so the move, and put it back. It works .. but feels like there may be troubles down the road. But .. at least it gives me what I want for now.

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.