Skip to main content

Behaviors

A behavior is ready-made movement or logic you add to an object in one tap: walk and jump with the joystick, drive like a car, follow the player, spin, float up and down… Add one with Inspect → + Add behavior.

+ Add behavior
+ Add behavior
…more
…more

Each behavior card has a switch to turn it on/off and 🗑 to remove it. Events can do the same while playing (Enable/disable behavior) and change any setting (Set behavior setting); scripts use entity.setBehaviorParam('platformer', 'speed', 8). In expressions: Player.behavior("platformer", "speed").

🏃 Platformer​

Walk with the joystick (or WASD / arrows) and jump with a button. Needs a dynamic Physics body — adding the behavior adds one that doesn’t tip over, and a Collider.

SettingDefaultWhat it does
Speed5Walking speed (m/s).
Jump strength7How high it jumps.
Jump buttonjumpThe touch button that jumps (see Touch controls).
Turn to directiononFace the way it moves.
Camera relativeon“Up” on the joystick means away from the camera, not a fixed direction.
AnimateonPlay the model’s idle / walk / sprint / jump / fall clips automatically.
behavior platformer

🕹️ Top-down movement​

Move in 8 directions on the ground with the joystick — no jumping. For top-down, twin-stick and rolling-ball games. Works with or without a Physics body (with one, it pushes and gets blocked by things).

SettingDefaultWhat it does
Speed5Movement speed.
Turn to directiononFace the way it moves.
Camera relativeonJoystick directions follow the camera.
AnimateonIdle / walk / sprint clips automatically.
behavior topdown

🏎️ Car​

Drive with the joystick: up = gas, down = brake, then reverse, left/right = steer. Real ray-cast vehicle physics with suspension. Needs a dynamic Physics body.

SettingDefaultWhat it does
Speed15Top speed (m/s).
Acceleration10How fast it speeds up.
Steering30Largest steering angle (degrees).
Grip1Tyre grip. Lower = drifty, higher = sticky.
Brake1Braking strength.
Wheels—Which nodes of the car model are the wheels (they spin and steer). Tap to choose; mark the front ones.

Wheels are found automatically in models whose parts are named “wheel…” (like the Kenney car kit). Otherwise pick them in Wheels; without wheels it drives on 4 invisible wheels at the corners.

behavior car

🎥 Camera follow​

Put it on the camera: it smoothly follows a target.

SettingDefaultWhat it does
TargetPlayerThe object to follow.
Offset X / Y / Z0, 6, 10Where the camera stays, relative to the target (6 up, 10 behind).
Smoothing5Higher = snappier, lower = floatier.
Look at targetonKeep pointing at the target.
Stay behindoffTurn the offset with the target’s heading — a chase camera for cars and runners.
behavior cameraFollow

🔄 Rotate​

Spins constantly — coins, fans, windmills, planets.

SettingDefaultWhat it does
Speed X / Y / Z0, 90, 0Degrees per second around each axis.
behavior rotate

➤ Bullet​

Keeps moving forward (its −Z direction) — bullets, arrows, rockets, moving obstacles. Spawn it facing the right way (e.g. Create object at the gun, then Set angle).

SettingDefaultWhat it does
Speed10Meters per second.
GravityoffFalls over time (arrows, cannonballs).
behavior bullet

〰️ Wave (sine)​

Smoothly moves back and forth forever — floating pickups, bobbing boats, moving platforms, pulsing lights.

SettingDefaultWhat it does
PropertyyWhat waves: x, y, z, angle, scale or opacity.
Magnitude0.5How far (meters; degrees for angle).
Period2Seconds for one full wave.
behavior sine

🎯 Follow target​

Moves toward another object — chasing enemies, pets, homing missiles.

SettingDefaultWhat it does
TargetPlayerWhat to follow.
Speed2Meters per second.
Stop distance1Stops this close.
Look atonFace the target.
AnimateonWalk / idle clips automatically.
behavior follow

🗑️ Destroy when far​

Removes the object when it falls or goes too far — keeps games with many bullets or spawned obstacles fast.

SettingDefaultWhat it does
Kill Y−20Destroyed when it falls below this height.
Max distance200Destroyed this far from the camera (0 = never).
behavior destroyOffscreen

✋ Draggable​

The player can drag it with a finger — puzzles, sorting games, placing things.

SettingDefaultWhat it does
Axisxzxz = along the ground, xy = up/down and sideways (facing the camera), or a single axis x, y, z.
behavior draggable