Overview
When building a world, it's common for players to fall through gaps between floors or off the edges and keep plummeting into the void. Left unaddressed, the player can't get back, and in the worst case has to rejoin the instance entirely.
To solve this, we'll place a "fall detection zone" beneath the world and automatically return any player who enters it to a safe location.
This article is the practical-example companion to Creating Teleporters: How to Instantly Move Players, which explains the teleport mechanism itself. The logic is the same — "when a player enters a trigger, move them with TeleportTo()" — just applied to the concrete goal of fall recovery. If you want to know the finer details of TeleportTo(), reading that article first will deepen your understanding.
And the best part: this is done with just about 20 lines of simple code. No tricky network syncing required.
How It Works
The mechanism is very simple.
- Place a large, invisible box (a trigger) even further below the lowest point of your world.
- When a player falls and enters this box, the trigger fires.
- At that moment, the player is sent back to a predefined safe point (returnPoint) with
TeleportTo().

In other words, what we're doing is exactly the same as "Pattern 1: Basic Teleporter (Trigger-Based)" from the teleporter article. The only difference is that the destination is a "safe point" rather than a "destination."
Note: VRChat has a built-in feature, the VRC Scene Descriptor's
Respawn Height Y. Fall below the height you specify and you're automatically returned to the spawn point. Setting this gives you minimal fall protection out of the box, but the trigger approach in this article has the advantage that you can freely specify where players return and easily add sound effects or visual effects later.
Step 1: Set Up the Respawn (Spawn) Point
First, prepare the location where players appear — which doubles as the safe point they return to. This is a basic part of VRChat world setup.
- Place the VRCWorld: Once you import the VRChat SDK, your Project contains a "VRCWorld" prefab. Drag it into the Hierarchy, and it adds the VRC Scene Descriptor component that every world needs.
- Create the spawn point object: Create an empty GameObject and give it a clear name like "SpawnPoint." Place it where you want players to appear (on the ground). The blue Z-axis arrow becomes the player's facing direction, so adjust its orientation too.
- Register it in the Spawns array: Open the VRC Scene Descriptor's Inspector, set the
SpawnsSize to 1, and drag the "SpawnPoint" you made in step 2 intoElement 0.

Now players will appear at the "SpawnPoint" location. This time, we'll reuse that SpawnPoint as the safe point players return to when they fall. It's easy because you don't need to create a new marker.

Note: If you want the return point to be separate from the spawn point, you can create another empty GameObject (e.g. "ReturnPoint") and place it wherever you like. You'll choose which one to use in a later step.
Step 2: Place a Fall-Detection Trigger Below the World
Next, we create the "invisible box" that catches falling players. The finished result looks like the diagram below: a trigger slightly larger than the world, spread out thin directly underneath it.

- Create an empty GameObject: Right-click in the Hierarchy → "Create Empty" to make an empty GameObject, and name it "FallTrigger."
- Position it directly below the world: Set the Transform's Position Y to a value well below the lowest floor of your world (e.g. Y = -20). Think of it as sitting in the path of falling players.
- Add a Box Collider: From "Add Component," add a
Box Collider. - Check Is Trigger: Enable
Is Triggeron the Box Collider. This lets it detect only that a player "entered" while letting them pass through. - Spread it out wide: Increase the collider's
Size(or the GameObject's Scale) so it covers the entire world from below. For example X = 500, Z = 500, Y = 10 — making it wider than the world's outer edge ensures nothing slips through.

Now we have a setup where "any player who falls below the world is guaranteed to enter this box." All that's left is to write the code that sends them back.
Step 3: Paste In the Script and Apply It
Now for the main event: the script. Just add a UdonBehaviour (UdonSharp) to "FallTrigger" and paste in the code below — that's all it takes.
- Add a UdonBehaviour: Select "FallTrigger" and add "Add Component" → "Udon Behaviour."
- Create a C# script: Right-click in the Project window → "Create" → "U# Script," and name it
FallReturnTrigger. - Paste in the code: Open the script you created and replace its entire contents with the code below.
Script: FallReturnTrigger.cs
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class FallReturnTrigger : UdonSharpBehaviour
{
[SerializeField] private Transform returnPoint;
public override void OnPlayerTriggerEnter(VRCPlayerApi player)
{
if (!Utilities.IsValid(player)) return;
if (!player.isLocal) return;
if (returnPoint == null) return;
player.TeleportTo(returnPoint.position, returnPoint.rotation);
}
}
That's all there is to it. Let's go through it line by line.
[SerializeField] private Transform returnPoint;
A variable to hold the return destination (the safe point). Adding[SerializeField]lets you assign it via drag-and-drop in Unity's Inspector.OnPlayerTriggerEnter(VRCPlayerApi player)
An event VRChat calls automatically the moment a player enters the trigger (the Is Trigger box).if (!Utilities.IsValid(player)) return;
A safety check for whether the player data is valid. If it isn't, nothing happens. It's good practice to include this for peace of mind.if (!player.isLocal) return;
An important check so that only you (the local player) are processed. Without it, when someone else falls, you could get dragged along and moved too.if (returnPoint == null) return;
Prevents an error from running with no return destination set.player.TeleportTo(returnPoint.position, returnPoint.rotation);
The core action. It instantly moves the fallen player to the safe point's position and rotation. The detailed workings of thisTeleportTo()are explained in the teleporter article.
Final Setup in Unity
Save the script and return to Unity, and you'll see a Return Point field on the "FallTrigger" UdonBehaviour.
- Drag the "SpawnPoint" you made in Step 1 into it.
![Overview of the setup: the same SpawnPoint is assigned to both the VRC Scene Descriptor's Spawns[0] and the FallReturnTrigger's Return Point](/5664b77fd4bbd56ae9a2c1156f40fbe1/20260522_udonsharp-fall-respawn_setup-wiring.png)
That completes the setup. Without rewriting a single line of code, you've built a fall-recovery gimmick with nothing but copy-paste and drag-and-drop.
Step 4: Test the Behavior (Demo)
Once it's set up, let's actually run it and check.
- Launch a local test with VRChat SDK's "Build & Test."
- Deliberately fall off the edge or through a gap in the floor.
- The moment you fall far enough to enter the detection trigger, if you instantly snap back to the SpawnPoint location, it works.

Since players are automatically returned when they fall, there's no longer any worry about someone getting stranded in the void. This small amount of code greatly improves your world's safety.
Note: If the player doesn't return, check these three things: (1) Is
Is Triggerenabled on the Box Collider, (2) does the collider properly cover the fall path, and (3) is "SpawnPoint" assigned to theReturn Pointfield on the UdonBehaviour.
Summary
- Fall recovery can be implemented with nothing more than "place a large trigger below the world and send any player who enters it back with
TeleportTo()." - For the return destination, simply reusing your spawn point (SpawnPoint) is the easiest approach.
- The script is about 20 lines and works with just copy-paste and drag-and-drop. There's no need to rewrite any code.
- The key point is to include the
player.isLocalcheck so that only you get moved. - The foundation of this mechanism is the same as the teleporter article. If you want a solid understanding of how teleporting works, read that one alongside this.
Falling accidents are one of the things that most damage the player experience. Just building this simple gimmick in from the start makes for a world people can enjoy with peace of mind. Be sure to try adding it to your own world.