Make Your Props Bounce: Physics-Enabled Options
Make Your Props Bounce: Physics-Enabled Options
Do you love watching crates smash into walls? Do you like it when balls roll and bounce? In Fortnite Creative, physics makes things move like they do in real life. Without physics, objects just sit still. They are like frozen statues. With physics, they fall, roll, and crash.
We will build a simple game. You will make a ball roll down a ramp. It will hit a barrier. Then it will trigger a light. This is how you make your island feel alive.
What You'll Learn
- What Physics means in Fortnite Creative.
- How to turn on Physics-Enabled Options for devices.
- How to use a Trigger Volume to detect movement.
- How to connect devices so they talk to each other.
How It Works
Imagine a toy car on a table. If the table is sticky, the car stays put. If the table is smooth, the car rolls. Physics is the rule that lets things roll.
In UEFN, we have special devices. They are like smart boxes. They can see things. They can change things. But they need to know if an object is "real" or just a picture.
Physics Props are objects that can move. Think of a bowling ball. It has weight. It has momentum. It can crash into things.
Trigger Volumes are invisible boxes. Think of them as tripwires. When a player or a prop walks through them, something happens.
When we turn on Physics-Enabled Options, we tell the devices: "Hey! Watch out for moving things!" This lets the Trigger Volume know when a physics prop enters its space. It also lets barriers block those props. This makes your game feel real.
Let's Build It
We will build a "Rolling Ball Challenge." A ball rolls down. It hits a sensor. The sensor turns on a light.
Step 1: Set the Stage
- Open your Fortnite Creative island.
- Go to Project Settings.
- Turn Physics to On. This is very important! Without this, nothing moves.
- Place a Prop Mover or just a simple ball prop. Let's use a Ball Prop.
- Place a Trigger Volume on the floor. Make it long like a path.
- Place a Light or a Color Changer at the end of the path.
Step 2: Connect the Devices
We will use Direct Event Binding. This is like plugging two toys together with a cable. When one moves, the other reacts.
- Click on the Trigger Volume.
- Look for the Physics Events Enabled option. Turn it On. This tells the volume to watch for physics props.
- Now, we need to bind the events.
- Find the On Physics Enter event on the Trigger Volume.
- Drag a line from this event to the Light.
- Connect it to the Turn On function of the Light.
Now, when the ball rolls into the volume, the light turns on!
Step 3: The Verse Code Way
Sometimes, device binding is not enough. You might want more control. Verse is the code language for Fortnite. It is like writing a recipe for the game.
Here is a simple Verse script. It checks if a physics prop is near. If it is, it changes the color of a prop.
# This is a Verse script. It controls a game device.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Native }
using { /UnrealEngine.com/Temporary/Diagnostics }
# This is our main device. It is like the brain.
# It wires up to a trigger_device and a customizable_light_device
# placed on the island in the UEFN editor.
ball_sensor_manager := class(creative_device):
# Wire this to a Trigger Device in the UEFN editor.
# The trigger device watches the area where the ball rolls.
@editable
BallTrigger : trigger_device = trigger_device{}
# Wire this to a Customizable Light Device in the UEFN editor.
# This is the light that turns on when the ball arrives.
@editable
Light : customizable_light_device = customizable_light_device{}
# OnBegin runs when the game starts.
# Think of it as the "start" button being pressed.
OnBegin<override>()<suspends> : void =
# We tell the trigger to listen.
# It watches for anything to enter its space,
# including physics props rolling into the volume.
# note: Verse trigger_device fires TriggeredEvent for
# players; for physics prop overlap, enable
# "Physics Events Enabled" on the trigger in the editor.
BallTrigger.TriggeredEvent.Subscribe(OnBallEntered)
# This function runs when the trigger fires.
# The agent is the thing that set off the trigger.
OnBallEntered(Agent : ?agent) : void =
# If the ball enters, turn on the light!
# This is like flipping a switch.
Light.TurnOn()
# Print a message to the log.
# This helps us know it worked.
Print("The ball hit the sensor!")```
### Walkthrough
Let's look at the code.
* `creative_device`: This is the real base class for all Verse devices in UEFN. Our `ball_sensor_manager` inherits from it, which means it gets all the powers of a creative device.
* `@editable`: This tag lets you wire a real device from the UEFN editor into the script. You drag a `trigger_device` from your island into the slot.
* `OnBegin<override>()<suspends>`: This function runs automatically when the game starts. The `override` keyword means we are replacing the default empty version. The `suspends` keyword means it can wait for things to happen.
* `TriggeredEvent.Subscribe(OnBallEntered)`: This is an **Event**. An event is something that happens. Like a doorbell ringing. The doorbell rings when someone presses it. Here, the event fires when something enters the trigger volume. We tell it to call our `OnBallEntered` function when that happens.
* `Agent : agent`: This is a **Variable**. A variable holds a value. Here, it holds a reference to the thing that entered the trigger.
* `Light.TurnOn()`: This is a **Function**. A function is an action. Like saying "Jump!" The light jumps to the "on" state.
## Try It Yourself
Can you make the ball stop when it hits a wall?
**Hint:** Try adding a **Barrier** device. Turn on the **Block Physics Props** option. Then, use a **Timer** device to turn the barrier on after 3 seconds. This gives the player time to roll the ball first!
## Recap
Physics makes your island feel real. Props can move and crash. Devices can watch for these movements. By turning on **Physics-Enabled Options**, you let triggers and barriers interact with moving objects. This creates fun gameplay. You are now a physics wizard!
## References
* https://dev.epicgames.com/documentation/en-us/fortnite/using-trigger-devices-in-fortnite-creative
* https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-volume-devices-in-fortnite-creative
* https://dev.epicgames.com/documentation/en-us/fortnite/using-volume-devices-in-fortnite-creative
* https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-barrier-devices-in-fortnite-creative
* https://dev.epicgames.com/documentation/en-us/fortnite/using-barrier-devices-in-fortnite-creative
Verse source files
- 01-device.verse · device
Turn this into a guided course
Add Physics-Enabled Options to your free study plan — we'll suggest related pages and stitch the lot into one compile-checked, self-guided lesson with worked examples and quizzes.
References
Original tutorial generated by Verse Island from the Verse/UEFN knowledge base, with references to the Epic Games sources above. Code is validated against the knowledge base.