scene portals

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
achuchon
Posts: 5
Joined: Sat Feb 03, 2024 3:23 pm

scene portals

Post by achuchon »

Hello! Sorry because I'm very new to Unity and I would like to ask a question, I'm trying to use the pixel crushers portal, but my character doesn't move, and I've tried creating a dontdestroyonload script but it doesn't work, and I'm not sure if I have to add one to the camera, another question I have is that my game is 2D in a 3D world and I would like to know how I can direct the camera in the direction I want. My camera and my player are two separate objects, thanks :D
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: scene portals

Post by Tony Li »

Hi,

> I'm trying to use the pixel crushers portal, but my character doesn't move

Do you mean that when your character enters the Scene Portal's trigger collider, it doesn't load the new scene? If so, make sure:
  • The character has a collider and a rigidbody.
  • The Scene Portal GameObject has a trigger collider.
  • The Scene Portal's Required Tag matches the character's Tag.
  • If you're using 2D colliders, tick the Welcome Window's USE_PHYSICS2D checkbox.
> another question I have is that my game is 2D in a 3D world and I would like to know how I can direct the camera in the direction I want. My camera and my player are two separate objects,

During conversations, you can use the Camera() sequencer command. Please see the Cutscene Sequence Tutorials.
achuchon
Posts: 5
Joined: Sat Feb 03, 2024 3:23 pm

Re: scene portals

Post by achuchon »

If the scene changes, but my player does not change the scene, the camera is lost
and the player
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: scene portals

Post by Tony Li »

Does your destination scene also have player and camera GameObjects?

If not, add them to the scene. The only exception is if your player or camera GameObjects are configured with DontDestroyOnLoad.
Post Reply