How do i make the box able to be picked up to end the game

https://playground.babylonjs.com/#N4TVAC#9 that is the project
the box that i need to be the objective is under the collisions which is at the bottom
I also don’t know how to make an end game loop command

If you really would like to get the answer here, it would be helpful to be more specific with your question.
Also, it seems that your PG doesn’t work
image

1 Like

i edited the page

I have no idea what is going on here or what you are asking for to be honest.

1 Like

hm I don’t know how to fix it

Add a collision observable to your camera

camera.onCollide = (mesh) => ...

Check the name of the mesh to be the box (I think it’s just “box”). If it matches then run whatever code you need.

1 Like

is there anything else I would need to do?

I mean, that’s up to you. Once the collider call back is called you put whatever code you want in there.

what code would I put in to stop the render loop when the box and camera collide?