fu
New Member
Posts: 3
|
Post by fu on May 9, 2021 10:10:43 GMT
After passing the checkpoint, the Procamera 2D camera starts from the initial position. How can I restart this from a checkpoint? I captured the Video. www.youtube.com/watch?v=86oR_2wUrpQ
|
|
|
Post by Luís Pedro Fonseca on May 10, 2021 8:39:03 GMT
|
|
fu
New Member
Posts: 3
|
Post by fu on May 10, 2021 23:31:13 GMT
Thank you for the reply. I tried but I could not solve. (The result is same as the video I captured.) I’m sorry I don't understand where to write the "MoveCameraInstantlyToPosition" method. Where should I write it to work as expected? ※My check point system is from this tutorial. www.youtube.com/watch?v=ofCLJsSUom0
|
|
|
Post by Luís Pedro Fonseca on May 11, 2021 8:41:30 GMT
fu Whenever your character is respawned you should call that method by passing the character position to it. Something like: ProCamera2D.Instance.MoveCameraInstantlyToPosition(character.transform.position);
|
|
fu
New Member
Posts: 3
|
Post by fu on May 11, 2021 16:54:58 GMT
Thanks for getting back to me so quickly. I found the cause of the problem. I had been using scene reload to handle player respawning, but it seemed that when I reloaded the scene, the camera was set to its default value. By setting the player's position to the last checkpoint passed, instead of reloading the scene when respawning, I got the result I wanted. Thanks!
|
|