0
Fixed

First person camera direction incorrect

Leslie Markley 2 months ago in Game Creator updated by Marti (Lead Developer) 2 months ago 3
I'm having problems with the first person camera positioning.  If I teleport the player to a marker (and then move them to the same marker so they're facing the right direction) then the camera still faces the opposite direction.

Also when switching from a tween camera to a first person camera, the first person camera tracks to the right of where the marker is facing.  I've also tried using a separate first person camera and I'm having the same issue with it.


Unity version:
2018.4.5f1
Game Creator version:
0.9.6

Answer

Answer
Fixed

Okay, this was a bit more complex than expected. I changed how the Teleport works so you will now have an option to rotate the Character towards where the Marker points at. This change also affected other Game Creator scripts, so I just can't post them here, since there are some dependencies. You'll have to wait for the next update.


On the other hand, there's still another issue. When teleporting a Character, if the Character has the Face Direction property set to Camera Direction, even if the character copies the direction of the Marker when teleporting, the camera will still keep its rotation, making the character immediately rotate where the camera looks at.

There's a solution for this too, however, which is creating another FPS Camera Motor and switching to this one AFTER the Teleport. When changing to a FPS motor, it's first positioned behind the Player, which is exactly what you want.

Hope this is clear. I'm closing this topic, since the fix is already done and will be available with version 1.0.3. Feel free to keep posting, however, if something wasn't clear. Cheers!

Planned

Hi Leslie, thank you for the detailed video explanation. There could be more than one possible thing causing this problem, but my guess is that the Teleport is not making the character face the correct direction. I believe that Teleport simply moves the character, but doesn't really turn it towards where the marker points towards to.

Could you confirm this is the case? The Player is still facing the same direction after the Teleport and after the Teleport? If so, I can provide a quick patch that should solve this problem temporary, until the next Game Creator release, which will include the bug-fix.

Yes this definitely appears to be the case.  The patch would be awesome.  Thanks so much for checking into it.

Answer
Fixed

Okay, this was a bit more complex than expected. I changed how the Teleport works so you will now have an option to rotate the Character towards where the Marker points at. This change also affected other Game Creator scripts, so I just can't post them here, since there are some dependencies. You'll have to wait for the next update.


On the other hand, there's still another issue. When teleporting a Character, if the Character has the Face Direction property set to Camera Direction, even if the character copies the direction of the Marker when teleporting, the camera will still keep its rotation, making the character immediately rotate where the camera looks at.

There's a solution for this too, however, which is creating another FPS Camera Motor and switching to this one AFTER the Teleport. When changing to a FPS motor, it's first positioned behind the Player, which is exactly what you want.

Hope this is clear. I'm closing this topic, since the fix is already done and will be available with version 1.0.3. Feel free to keep posting, however, if something wasn't clear. Cheers!