How to make a portal through collision

I only know that button can be used to teleport to another scene. How to write this script to compare the collision and then jump?Can anyone help me?

Hi @Lily!

The manual page below might be a good place to start.

Hi @Albertos !
I tried to use the script in the document to test the collision effect of a scene, but an error occurred. The error is displayed at Scripting | PlayCanvas Developer Site. This is very confusing to me. Can you answer this question for me?

Are you sure that’s the correct link?

Could you please share the editor link of your project?

I’m pretty sure that I built a simple scene using a collision script under the URL. After running it, it showed // Scripting | PlayCanvas Developer Site this error.
I rewrote two scripts, one script determines the teleportation position, and the other script determines the teleportation door. Now I can achieve fixed-point teleportation, but there is no way to control the angle of camera rotation. The camera that follows this player can only use the rotation angle set at the beginning. This bothers me.

Not sure if this is related to the topic, but if you share the editor link of your project, someone might take a look.

Project link here
One script controls the teleportation points under Root, which are otherscens.js and untitledScene.js respectively. The other scripts are triggerenter.js and triggerenter2.js, which correspond to the teleportation door and scene respectively.Can you help me take a look?