Skip to content

Respawn objects that fall off the world

Updated

A ball rolls down a ramp and off its end; once it is 10 m down, teleport puts its body back at its starting place, and it rolls again.

Watch the ball roll off the ramp, fall and come back to the top. Drag to orbit the camera, scroll to zoom.

Respawn objects that fall off the world

The script is explained step by step in Respawn objects that fall off the world.

Download the project file below, then import it in XR Hub with Projects › New › Import, as described in Projects and templates. It opens in XR Creator with the same scene you see running above, each script already attached to its Behavior entity. From there you can edit the scripts, adjust components and their props, preview your changes, and deploy the result as a world of your own.

BallRespawn.xrproj