using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Simulation/Tags }
using { /Verse.org/Assets }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /UnrealEngine.com/Temporary/Diagnostics }
# THE DRIVABLE MINI-EXPERIENCE — capstone of "Scene Graph: Car Primitive".
#
# Every piece you earned across the domain, on one timeline:
# * Part 1 the CAR PRIMITIVE — a tagged prop we move from Verse.
# * Part 2 COLOUR — SetMaterial swaps the whole paint job.
# * Part 3 ENTER -> FIRST PERSON — a mutator zone + first-person camera.
# * here DRIVE — Input Trigger devices (throttle / steer) move the car
# while a player is seated, plus a paint cycle on a fourth input.
#
# How it drives: the car is a prop primitive, so we move it ourselves with
# MoveTo. Holding the throttle key advances the car along its own forward; the
# steer keys rotate it. We do this in a `spawn`ed <suspends> loop that runs only
# while a driver is in the zone, reading each Input Trigger's `IsHeld[Agent]`
# every tick. That keeps the controls responsive without authoring any custom
# input action (which is Epic-internal).
#
# The car body + the entry zone + the paint materials are discovered/wired so
# you can re-skin the whole experience without touching code.
car_body_tag := class(tag) {}
car_drivable_capstone_device := class(creative_device):
Verse Library
verse
03 Device
Combines prop discovery, input triggers, and MoveTo into a playable driving loop.
verse-library/verse-car-drivable-capstone/03-device.verse
Sign in free to read the full source 🌴
This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.