Gessa Docs
Recipes

Recipe

Jump pad bounce pad launcher and springboard

The player walks onto a pad and is flung up (or forward) into the air: a bounce pad, a springboard, a launcher, a trampoline, a knockback plate. The engine has no JumpPadComponent and never did; the pad is a trigger plus a script that issues a physics launch command to whoever entered.
engine v1.0.234since script-semantic-patch-ops.v1, action-catalog.v1.0.232, physics.v1, mutation.v1Copy for LLM

Use this for

a pad the player steps on that flings them upward or forward; bounce pads, launch pads, springboards, trampolines, knockback plates, and any "step here and get launched" surface

Not for

a platform that carries the player while they stand on it (see moving-platforms-and-elevators); teleporting the player to another location (see teleporters-and-portals); the player's own jump on a key press (see third-person-and-platformer-movement)

Pairs with: Physics colliders rigid bodies triggers and joints, Third-person follow camera and platformer jump movement, Event wiring one trigger emits another responder reacts, Audio sound effects music and positional feedback

The recipe

Author with project_apply_script_semantic_patch using the ai_safe op pack.

  1. Give the pad a trigger ColliderComponent (collision:"trigger") sized to the pad surface, via project_add_component. A solid collider would block the player instead of detecting the step-on.
  2. Add the launch handler with addTriggerHandler ({ "handlerKey":"onLaunch" }). Author the body as whole-body GessaScript through replaceScriptFromGessaScript.
  3. Inside the handler the entering entity is event.other (a RuntimeEntitySnapshot); its id is event.other.id. Launch it: ctx.physics.command(event.other.id, { type: "launch", velocity: { x: 0, y: 12, z: 0 } }). launch SETS the character's linear velocity, which is the one sanctioned way to fling a kinematic CharacterMovementComponent body from a script.
  4. Gate to players so a stray prop does not trip the pad: check event.other.tags (e.g. if (event.other.tags.includes("player"))) before the command, or filter by a component you know only the player carries via ctx.entity.readComponent.
  5. Directional launch (a ramp that throws the player forward): set the horizontal components too, e.g. velocity: { x: 0, y: 9, z: 14 }. Keep a positive y so the arc clears the pad.
  6. Feedback: ctx.audio.play a spring/boing clip in the same handler so the launch reads.

Pitfalls

  • Do NOT ctx.entity.patchComponent the player's TransformComponent to fake a jump: teleporting the position fights prediction and the character controller. ctx.physics.command with launch is the only correct lane.
  • A solid collider on the pad blocks the player; the detector must be a trigger collider. Keep the visible pad mesh and the trigger volume aligned.
  • launch REPLACES velocity rather than adding to it, so a tiny y gives a weak hop regardless of incoming speed; tune the y magnitude, not the collider.
  • Launch the ENTERING entity (event.other.id), never the pad itself; commanding the pad's own id does nothing useful and the player keeps walking.

Verify

  • simulation_run (qa.run.start) driving the player onto the pad and asserting the resulting upward velocity / peak height.
  • project_get_graph_snapshot to confirm the trigger ColliderComponent and the trigger handler landed on the pad entity.
Was this helpful?Report an issueContact support

On this page