Location Error When Loading after Portal

Hi

I was having an issue with loading asave after going through a portal. When I walk through a portal it saves the previous scene, and puts me in the correct location in the new scene. But in the new scene, if I were to load without saving again first, it would put me in a completely weird location.

I tracked this down to an issue of when the location information is saved when travelling through a portal. i.e. you travel through a portal and it saves the location in the original scene, then it transfers to the new scene and loads the save file, finally it updates your location according to the portal location. So you start in the correct position, but when you press load it takes the location information from the original scene, not the new one. To fix this I just added an extra save line just before the portal game object is destroyed (bit circled in the code below).

So my question is, will this bug be address in a future lecture, or this there something else I may have missed earlier on?

Cheers
John :slight_smile:

Nevermind, it is literally covered in the next lecture, thought I missed something earlier on, so glad I didn’t :slight_smile:

Good job in noticing the issue and finding the solution!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms