Documentation

Avatar & Camera Guide

Learn how to control the camera, understand the skateboard physics, and load custom 3D rigged avatars.

Camera Controls

Camera Modes (Press V to cycle)

Follow
Classic third-person follow camera that tracks movement direction
FOV: 60 Dist: 5
Orbit
Manual orbit camera - drag mouse or use right stick to rotate
FOV: 55 Dist: 6
First Person
View from the skater's perspective - immersive but challenging
FOV: 90 Dist: 0
Cinematic
Smooth, cinematic camera with dramatic angles
FOV: 45 Dist: 8
Free Camera
Detached camera for spectating - use WASD to move
FOV: 60 Dist: 10

Mouse

Left drag Orbit camera around skater
Right drag / Pointer lock Free look mode
Scroll wheel Zoom in/out

Keyboard

C Toggle pointer lock
V Cycle camera mode
H Toggle controls HUD

Gamepad

Right stick Orbit camera
Right stick press Reset camera
Select/Back Cycle camera mode

Skateboard Controls

Movement

W / Up Arrow Push forward
S / Down Arrow Brake / slow down
A/D / Left/Right Turn / carve
Q / E Lean left / right

Tricks

Space (hold) Charge ollie
Space (release) Jump / ollie
R Reset position
Esc Pause game

Pro tip: Hold the ollie button longer for higher jumps. Use lean (Q/E) combined with turns for sharper carves and to maintain balance at high speeds.

Avatar Animation States

The avatar automatically animates based on physics state. These poses blend smoothly based on your speed, direction, and actions.

idle
Standing on board, relaxed
pushing
Pushing with back foot
riding
Active riding stance
carving
Leaning into a turn
crouching
Pre-ollie crouch
ollie
Ollie jump motion
airborne
In the air
landing
Absorbing landing impact

Loading Custom 3D Avatars

The Board Sports Engine supports loading custom 3D rigged humanoid avatars in FBX or GLB format. This allows you to use your own character models with full skeletal animation support.

Supported Formats

GLB (recommended)GLTFFBX

Model Requirements

  • + Humanoid skeleton with standard bone names (Mixamo compatible)
  • + Y-up coordinate system
  • + Model should be around 1.7-1.8 meters tall
  • + Rigged and weight-painted mesh
  • + Optional: Embedded animations

Recommended Software

  • * Blender (free) - export as GLB
  • * Mixamo (free) - auto-rigging and animations
  • * Maya/3ds Max - professional options

Tips for Best Results

  • ! Use Mixamo to auto-rig your character
  • ! Download animations from Mixamo in FBX format
  • ! Convert FBX to GLB using Blender for better web performance
  • ! Keep polygon count under 15k for smooth performance
  • ! Test your model at https://gltf-viewer.donmccurdy.com/

Step-by-Step: Adding Your Avatar

1

Get or Create a Rigged Model

Use Mixamo to get a free rigged character, or create your own in Blender. The model must have a humanoid skeleton with standard bone names.

2

Export as GLB

GLB is the recommended format for web. In Blender: File > Export > glTF 2.0 (.glb/.gltf). Make sure to include the skeleton and any animations.

3

Place in Static Folder

Put your GLB file in static/models/. For example: static/models/my-skater.glb

4

Configure the Avatar Store

Update the avatar configuration to point to your model:

import { setModelPath } from '$lib/stores/avatar-store';

// Load your custom avatar
setModelPath('/models/my-skater.glb', 'glb');
5

Adjust Scale and Offset

Fine-tune how your avatar sits on the skateboard:

import { setAvatarScale, setAvatarOffset } from '$lib/stores/avatar-store';

setAvatarScale(1.0);  // Adjust if too big/small
setAvatarOffset(0.1); // Raise/lower on the board

Board Sports Engine — Physics-first game development.

Press Ctrl+K for commands