Spawning between levels only working in one direction

Hello!

I have two scenes that I’m trying to move between using portals. Moving from Level1 to Level2 is fine, but moving from Level2 to Level1 doesn’t seem to be working, as it seems like my OnTriggerEnter method isn’t working (printing to the console doesn’t work when I think it should be triggering).

As far as I can tell, everything between the two scenes is set up the same. I have a Sphere Collider on my portal with IsTrigger checked (in both scenes), and I have the Portal script attached, with all methods looking like they do in the GitHub code - but one direction works, and one doesn’t.

Any ideas gratefully received?!?!

1 Like

Okay I fixed this, and it turned out it was a rookie mistake - I had a capsule collider on my character when I was leaving the first scene as I suspected, but I guess I didn’t add this to the prefab, and it wasn’t there in the second scene :man_facepalming:

1 Like

For best practice when changing the player (or anything prefabbed) is to edit the prefab itself, and not the instance of it in the scene. This is the best way to prevent mismatches between scenes. I’m glad you got that worked out.

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

Privacy & Terms