Verse Library verse

03 Device

Wires a button to instantly launch all players upward using set velocity, ideal for bounce pads or crowd-pleaser traps.

verse-library/verse-char-move-teleport/03-device.verse

using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /Verse.org/SpatialMath }
using { /UnrealEngine.com/Temporary/Diagnostics }

# MOVE THAT CHARACTER — push the player's body around from Verse.
#
# Once you hold a player's fort_character you can move it two clean ways:
#   * SetLinearVelocity — DIRECT. Set how fast and which way they're moving
#                   right now (meters/second). The launch-pad punch.
#   * ApplyLinearImpulse — PHYSICS. A one-off shove in Newton-seconds, blended
#                   with whatever they were already doing — a softer nudge.
# (A third, TeleportTo, blinks them instantly to a spot — we use it in the
# capstone, where it pairs with the kill-floor catcher.)
#
# This device wires a Button to a "launch" that flings every player straight
# up — a crowd-pleaser bounce pad you can drop into any island.
#
# AXIS NAMING: a /Verse.org/SpatialMath vector3 uses Forward / Left / Up
# (the same Scene Graph convention you met in the Animation series) — NOT
# X / Y / Z. Up is the vertical axis, so an upward pop sets only `Up`.
char_launcher_device := class(creative_device):

    # Press this to launch everyone.
    @editable
    LaunchButton : button_device = button_device{}

    # Upward launch speed in meters/second. Designer-tunable.
    @editable

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.

Sign in with Discord

Comments

    Sign in to vote, comment, or suggest an edit. Sign in