How would i change the collision code from the tutorial so when an entity hits it it changes the scene

this is a 3d game and i want it so that when the player walks into the collision it will change the scene

Hi @DemonlordIV,

Here is a good tutorial on triggers, so you can execute code as a response when an entity enters a trigger:

https://developer.playcanvas.com/en/tutorials/collision-and-triggers/

And here are some examples on how to execute the scene change:

https://developer.playcanvas.com/en/tutorials/?tags=scenes

1 Like