0
Fixed

First person controller issue

Simon Ankerstjerne Arazm 9 months ago in Game Creator updated by Marti (Lead Developer) 3 months ago 14

I'm having some issues with the first person controller quickly rotating whenever i start a scene. It quickly acts as if the cam is turned the opposite way, and then quickly janks to the set view.

Unity version:
2019.1.5f1
Game Creator version:
Latest

Answer

Answer
Fixed

Eeagleeyez is correct. However, this is a bug, since the Player should be able to be rotated towards any direction and the camera should behave exactly the same. Despite, this helped us narrow down the problem :-)


The issue was the motor detected the first frame as if it was changing from another camera motor, and applied the transition effect, when it should have not.

I've patched this bug and it will be automatically fixed in the next update. You don't have to do anything on your part. I'm also marking this issue as resolved, since the bug has been patched. When the update is live, if you still experience any issues, feel free to reopen this thread.


Thanks and happy game making!

Under review

Sure! I'll take a look asap and circle back

I'm trying to reproduce this, but haven't been able to see what's wrong. However, this might be due to a misconception. The FPS camera motor doesn't depend on where the motor is initially looking at, but here the character (Player most likely) is looking at, when pressing the Play button.

Hello Marti!

We've had a few months now where we put GC aside, due to the continued issue of the player camera not working in the FPS Motor. We now tried again, to see if it would work, but still find that the player camera rotates 180 degrees, if it is turned opposite of its initial rotation. Don't know if this helps, but we've tried in the newest unity build, with a fresh install of GC. 

Do you have a video capture showing this error? Also, make sure you're not using Unity 2019.3. It's quite unstable. We recommend using 2018.4 LTS, although 2019.1 and 2019.2 seem to work just fine.

I'll send a video in about 5-10 min :) 

Any update?

Best regards,

Simon 

Hey Simon.

Thank you for the video. This really helps. This is due to the camera renders the first frame before the motor tells the main camera which position and rotation it should be at.

There's a simple work around, although I'm opening a ticket and see if I can update the position before the first frame render is displayed:


Start your game and don't touch any input. Wait a second or so until the main camera moves to its starting position. Now, press Ctrl + Shift + P to pause the editor.


Select the main camera and, at the Transform component, click at the little cog on the top right and select "Copy Component".


Now exit play-mode and select the main camera's Transform again and right click the cog. But now, choose "Paste Component Values". This will move the initial camera's position to match what is going to be the starting position, so when the first frame is issued, it will match the motor's position and rotation.

Hi!


Just tried what you mentioned above, and the camera still turns around, even with that transform being pasted, and the steps being followed perfecly :( 

Hey Simon, sorry for the late reply. Hmm that should really have fixed the issue. Looks like it works fine on my end.


Could you make another video with the current configuration? Also, make sure to hit the "Pause" button before entering play mode and select the Camera Controller. That way I'll be able to see the initial position of the camera controller.

Then, click onto the "next frame" button (right next to the Play) and see how the camera transitions between its initial position and the motor.

Planned

Thanks Simon;

I'm currently working on an update for the Game Creator core. I'm opening a ticket and have a look at this issue. I'm not sure where the problem may be, but I'll circle back as soon as I have something.

Cheers!

+1

This is because you have rotated your player 180 on the y axis. Try with no rotations on the player.

Answer
Fixed

Eeagleeyez is correct. However, this is a bug, since the Player should be able to be rotated towards any direction and the camera should behave exactly the same. Despite, this helped us narrow down the problem :-)


The issue was the motor detected the first frame as if it was changing from another camera motor, and applied the transition effect, when it should have not.

I've patched this bug and it will be automatically fixed in the next update. You don't have to do anything on your part. I'm also marking this issue as resolved, since the bug has been patched. When the update is live, if you still experience any issues, feel free to reopen this thread.


Thanks and happy game making!