Forum rules - please read before posting.

First person control problem after engine restart

Hello. I just recently started working with Adventure Creator and need help with a very strange problem.

I did everything as in the tutorial (https://adventurecreator.org/tutorials/making-first-person-game).

  • I created a new scene with the wizard (first person template).
  • Created a collison box for navigation,
  • Enable: Lock cursor in screen's center when game begins.
  • Changed the input under Edit → Project Settings → Input
  • I have created a player with the Character Wizard

I could control the character with mouse and keyboard. There were no problems. After I restarted the Unity Engine, the control does not work properly. The player character no longer moves in the direction of the cursor but only in the direction of the arrow keys (or wasd).

I tested with Unity version 2020.3 and 2019.4.22 (AC version 1.73.3) and found the same error everywhere. I could only test on one device, so I'm not quite sure if this is an AC problem or a local one. No matter what the problem is, I don't know what to do.

Thanks in advance

Comments

  • edited March 2021

    Welcome to the community, @DDX90.

    Sounds like you've done everything right. It should be the case that Unity saves and changes made to your game before quitting, but is it possible any of the steps you've listed above have been reverted by restarting Unity?

    To help understand the issue, you're saying that the A/D keys cause the character to turn, rather than strafe? Are you still able to turn the camera with the mouse?

    At the bottom of the Settings Manager, you can enable the AC Status box in the corner of the Game window. Does this correctly display the Player's First Person Camera? You needn't have to switch to this camera manually - if first-person is running correctly, it should be automatic.

    In your Settings Manager, is your Movement method still set to First Person, and is the Turning type option (under "Movement settings") set to Relative To Camera? Screens of your Manager, Player object, and Unity Input settings, may help reveal what's gone wrong.

  • I can still rotate the camera, but it does not change the direction of movement. The camera also changes to the correct perspective. Here are my settings: https://my.hidrive.com/share/s8ew4dsnzt

  • edited March 2021

    Apologies for the trouble.

    So W/S always move the character in the same direction, regardless of the camera orientation. Is this also true for the A/D keys?

    Though your screens suggest this shouldn't be the case, it does seem to have behaviour associated with the MainCamera not updating with the First Person Camera.

    At runtime, the MainCamera should "snap" itself to whichever GameCamera is active - in this case, the First Person Camera. The directions that the Player moves is based on the MainCamera's orientation - so if this somehow wasn't rotating, it would produce similar symptoms.

    If you view the MainCamera in the Scene window while the game runs, is it correctly snapping itself to the First Person Camera? And is this the only camera in the scene tagged as MainCamera?

    Are you making use of any camera-related packages, i.e URP/HDRP?

    You can try toggling the Cache 'Camera.main' variable? option in the Settings Manager, but you're also welcome to PM me a private link to the project. I suspect this may be some odd quirk or minor setting that will be hard to spot through screenshots.

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.