#a beginner want to create a demo of scene transition

1 messages · Page 1 of 1 (latest)

wintry cobalt
#

Hello everyone, I am a beginner who has only been learning Unity game development for a short time. I would like to create an effect where the player enters an indoor scene when approaching a door, similar to what is shown in the video. However, I am not sure how to implement this.

My goal is that when the player approaches a door in the outdoor scene, it triggers a scene transition, and the player then appears at a fixed position inside the indoor scene, facing forward (from a third-person perspective, this means the player’s back is facing the camera). I want this to work reliably every time, with the player spawning correctly without bugs or position issues.

Could you please advise on how this can be implemented?

vocal notch
#

for the door you would use some kind of detection that you are in range, this can be achieved with a onTriggerEnter, a raycast, a spherecheck or something similar. As for the scene change you could simply move your camera to a position in the scene where you would have the interior, change the players position and rotation. you could also create a whole new scene for that. when the transition is done you can have a different behaviour for the cam, this can be done in many ways, for example simply disabling and enabling cameras.

#

the opening and closing of the door and the black mask effect would be handled by animations

wintry cobalt
vocal notch
#

sounds ok to me unless you want to have some user input instead (pressing a key to open door)

#

if you wanted to do you could use the OnTriggerStay and then ask for the keypress or OnTriggerEnter and OnTriggerExit with a simple bool check, on enter you say inrange = true and on exit you say inrange = false

wintry cobalt
vocal notch
#

if the players falls through the ground it could be that there is no collider at that position or that the player was forced to penetrate through the ground by using some non pyhsics based movement like transform.position

#

nothing to do with the current situation

wintry cobalt
# vocal notch if the players falls through the ground it could be that there is no collider at...

During my tests in Unity, everything worked fine—the player doesn't fall endlessly when transitioning between scenes, and there are no such issues when running the built exe file either. However, after I shared the packaged file with my friends, they reported that the player keeps falling in their case. I'm not sure why this is happening. Could it be that I missed some settings during the packaging process, causing the player's spawn point in the new scene to shift? I'd really appreciate any help on this!

vocal notch
#

really difficult to tell what the reason could be

#

if you have some code where you move the player it could be helpfull

#

ah ok i see you already started a new thread, i cant see any thing that would cause that

wintry cobalt
vocal notch
#

if you want we can try to find out why that happens , maybe send a video or some more infos when that occurs