Forum rules - please read before posting.

Mouse look around not working?

I managed to get AC running in my scene using the First Person Movement method but for some reason only the move to forward, backward, left, right works, but when I move the cursor, it does not turn the camera lookat.
CursorHorizontal and Vertical is defined.
Any ideas?

Comments

  • Does your mouse cursor move when you use the mouse?  AC has two cursor modes: locked and unlocked.  Only when it's locked will you be able to free-aim and rotate the camera.  Make sure that Lock cursor in screen's centre when game begins? is checked in the list of Interface settings.  Also be sure to map CursorHorizontal/Vertical to mouse axes, not buttons.

    If you're trying out a new player prefab, know that you can temporarily use Tin Pot in your scene to test out your movement, as he's also configured to work in First Person.  You can find him in /Assets/AdventureCreator/Demo/Resources.
  • Ok, this works now also! Thanks!
    I am wondering though, what is the right interaction paradigm here?
    If I am using FPS movement and the free-aim rotation camera thingy, then I am not able to select items from the inventory list...
    But if I the mouse is not locked, I cannot rotate the camer in FPS mode.

    Am I missing something?

    Thanks!
  • You can toggle between the cursor's two states by mapping an input button to the ToggleCursor input - see Section 2.4 of the Manual.  You can also use the Player: Constrain Action to lock free-aiming through Actions if you want to enforce this state at any time.
  • So isn't there somehow a way to have the camera rotation follow the cusor maybe only horizontally but still be able to select the inventory bar? I would like to have an FPS like camera but still be able to interact with the inventories I have without having to switch navigation modes.
  • If you open up PlayerInput.cs and go to line 224, you'll see the line:

    freeAim = Vector2.zero;

    This tells AC to disable free-aiming while the cursor is locked.  If you replace it with:

    freeAim = new Vector2 (InputGetAxis ("CursorHorizontal"), 0f);

    Then it will instead be constrained to horizontal movement only.
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.