# Run and Jump Mechanic

**URL:** <https://forum.playcanvas.com/t/run-and-jump-mechanic/42745>\
**Category:** Help & Support\
**Created:** [November 3, 2026, 2:43am UTC](https://forum.playcanvas.com/t/run-and-jump-mechanic/42745 "2026-11-03T02:43:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaxSanta](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/maxsanta/32/38488_2.png) [@MaxSanta](https://forum.playcanvas.com/u/MaxSanta)\
**Post date:** [November 3, 2026, 2:43am UTC](https://forum.playcanvas.com/t/run-and-jump-mechanic/42745/1 "2026-11-03T02:43:47Z")

</div>

I can’t figure out how to add a jump amd run mechanic to my potential game….

---

<div class="post-metadata">

**Author:** ![will](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/will/32/4560_2.png) [@will](https://forum.playcanvas.com/u/will)\
**Post date:** [November 24, 2026, 12:57pm UTC](https://forum.playcanvas.com/t/run-and-jump-mechanic/42745/4 "2026-11-24T12:57:29Z")

</div>

Hi @MaxSanta,

The quickest way is to start from the first-person controller script that ships with the engine. It handles walking, running and jumping, with keyboard and mouse, touch and gamepad input. You can try it in the [First Person example](https://playcanvas.com/examples#/camera/first-person).

To add it to an Editor project:

1. Open the Scene Settings panel, expand **PHYSICS** and click **IMPORT AMMO**. The controller is physics-based, so it needs this.
2. In the Assets panel, create a new script called `first-person-controller.mjs` and replace its contents with [this file](https://github.com/playcanvas/engine/blob/v2.24.3/scripts/esm/first-person-controller.mjs).
3. Create an entity called Player and place it a little above your floor. Add a **Script** component to it and add the `firstPersonController` script.
4. Make your Camera a child of Player, set its position to `0, 0.5, 0`, and drag it into the script’s **Camera** attribute.
5. Give your floor and walls a **Collision** component sized to fit them and a **Rigid Body** set to **Static** , so the player has something to stand on.

The script adds a capsule collision shape and a dynamic rigid body to the player for you. When you Launch, click to capture the mouse, then use WASD to move, Shift to run and Space to jump. You can tune **Ground Speed** , **Sprint Multiplier** and **Jump Force** in the script’s attributes.

If you’d rather have a camera that follows a character from behind, there’s also a [third-person controller](https://github.com/playcanvas/engine/blob/v2.24.3/scripts/esm/third-person-controller.mjs), shown in the [Third Person example](https://playcanvas.com/examples#/gaussian-splatting/third-person).

If you get stuck, post a link to your project and we’ll take a look.
