Skip to main content

Tutorials

Learn the PlayCanvas Editor with step-by-step tutorials, or open a sample project to see how it is built.

Tutorials44

Step-by-step guides that explain how something is built.

First Person MovementBuild a first-person character from scratch. Look around with the mouse, walk with forces on a rigid body and jump, in a small level made of boxes.Entity PickingCompare collision picking and framebuffer picking to select 3D entities when the user clicks the scene.Collision and TriggersUse collision shapes with rigidbodies for physical contacts and trigger volumes for overlap events without blocking motion.Real Time MultiplayerRun a Node.js and Socket.IO server on your own computer and keep players in sync across browsers, then put the server online, with no hosted multiplayer service.Anim State Graph BlendingBlend animation clips in the Anim State Graph so characters transition smoothly between idle, walk, punch, and other cycles.Animation BlendingLegacy Model and Animation tutorial; prefer Anim State Graph blending for smooth transitions between character cycles.Basic Mouse InputUse the Mouse API to read movement, button presses, and consistent screen coordinates across browsers for interactive controls.Basic Keyboard InputUse the Keyboard API to detect key presses and held keys for gameplay actions and simple interactions.Custom ShadersUse ShaderMaterial for dissolve and edge effects with custom shaders that run on both WebGL and WebGPU backends.User Interface - ButtonsBuild clickable buttons with Element and Button components on a Screen, wiring events for hover, press, and navigation states.Forces and ImpulsesApply forces, impulses, and torques to dynamic rigidbodies and tune damping and mass for responsive physics-driven motion.Real-time Multiplayer with ColyseusWire PlayCanvas to a Colyseus server for room state sync, messaging, and matchmaking in a simple click-to-move demo.Programmatically Creating EntitiesInstantiate entities from scripts, parent them under the scene root, and attach components to build objects without the editor.Loading JSON DataLoad JSON from a bundled asset or over HTTP from a remote URL and parse it inside your PlayCanvas scripts at runtime.WebXR UI InteractionPoint WebXR laser pointers or gaze at screen-space UI and handle clicks across desktop, mobile, and headset browsers.Basic AudioUse sound and listener components so positional 3D audio follows moving sources relative to the listener entity.Crash Course - Make a GameFollow an end-to-end PlayCanvas game build with video and a playable demo covering physics, UI, and core workflow.Light CookiesApply texture or cubemap cookies to spot and omni lights to project masks, grids, and colored glass-style lighting effects.Using the Asset RegistryFind, reference, and stream assets from the registry at runtime instead of relying solely on editor preloads for every file.More CamerasScript camera components to change FOV, position, and active camera at runtime for zooming, cuts, and multi-camera setups.Custom Post EffectsAuthor shaders and a custom post effect that applies watercolor blur and paper grain over the final framebuffer.Light HalosBuild a billboarded glowing halo plane that fades when viewed edge-on to fake foggy air and bright lamp glare around lights.Controlling LightsToggle lights and adjust color and intensity from scripts for simple runtime lighting changes in your scene.Animated TexturesScroll UV offsets on materials each frame to fake flowing water, conveyors, and other moving surface effects.Audio EffectsChain Web Audio nodes in PlayCanvas to add reverb, filters, and other effects to sounds routed through the engine.Real-time Multiplayer with PhotonIntegrate Photon networking for authoritative movement, matchmaking, and room joins from a PlayCanvas HTML5 client.User Interface - LeaderboardPopulate a scrolling leaderboard from JSON data using Element text rows and scripted sorting for score displays.User Interface - Progress BarCreate a fillable progress bar with nested Elements and anchors that animate from empty to full over time.Touchscreen Joypad ControlsAdd a customizable on-screen twin-stick style joypad with PlayCanvas UI elements for mobile character control.User Interface - Stats CounterCombine plus and minus buttons with progress visuals to increment stats and show live numeric readouts in the UI.User Interface - Text InputOverlay an HTML text input on the canvas for OS-native typing, copy-paste, and IME support tied to PlayCanvas UI focus.Google H5 Ads Beta MonetizationIntegrate Google H5 Games interstitial and rewarded ads into a PlayCanvas title for mobile web monetization.Spine AnimationPlay Spine 4.3 skeletal animations in the Editor with the playcanvas-spine plugin, from binary and JSON exports, and control them from a script.Making a Simple Game - Part 1: Setting Up the SceneStart building Keepy Up, a tap-to-play football game, in the PlayCanvas Editor. Fork the starter project, place the stadium and the ball, and set up the camera and light.Making a Simple Game - Part 2: Lighting and MaterialsGive Keepy Up its finished look. Turn a sky image into image-based lighting, add shadows, set the camera's tone mapping and make the football's materials shine.Making a Simple Game - Part 3: Making the Ball MoveWrite the first two scripts for Keepy Up. One moves the football under gravity and kicks it, and the other turns mouse clicks and touches into kicks.Making a Simple Game - Part 4: Game Flow and ScoringAdd a game script that keeps score using application events, and build the first piece of user interface for Keepy Up, a score drawn with a Screen and a Text Element.Making a Simple Game - Part 5: Menu and Game Over ScreensBuild the title screen and the game over screen for Keepy Up from Text, Image and Group elements, and show and hide them with two short scripts.Making a Simple Game - Part 6: Sound, Particles and PublishingFinish Keepy Up with a kick sound, music, a game over sound and a burst of particles, all driven by one script, then publish the game to the web.Basic CamerasAdd camera entities so your scene renders to the screen and learn the minimum editor setup for a visible view.Basic MaterialsCreate materials, assign them to meshes, and tune color and physical shading on primitives step by step.Creating a Music VisualizerPipe Web Audio analyser frequency data into a PlayCanvas script to animate bars or graphs that react to playing music in real time.Importing your first Model and AnimationImport a free rigged character into the Editor, add it to the scene and play a looping run animation with the Anim component.Manipulating EntitiesMove, rotate, and scale entities by editing local and world transforms and understanding how child hierarchies inherit motion.

Sample projects103

Working projects to open in the Editor, read and fork.

Flappy BirdWebXR VR LabOrange Room3D Gaussian Splat StatuesWebXR Realistic Hands360 lookaround cameraVideo TexturesBasic touch inputAdditive Loading ScenesFrames Per Sec (FPS) counterHTML/CSS UIChanging ScenesCamera following a pathOrbit cameraWebXR 360 VideoTerrain Generation from HeightmapVehicle PhysicsAnimate entities with curvesHTML/CSS - Live Updates3D Gaussian Splat Streamed SOGThird Person ControllerFirst Person Shooter Starter KitPoint and click movementBase64 Loading Screen ImagesPlanet EarthExplosion Particle EffectWebXR Hello WorldInformation hotspotsWebXR 360 ImageWarp a Sprite with GLSLWebXR: AR Image TrackingProcedural LevelsLoading glTF GLBsChanging textures at runtimePause/Play applicationRotating Objects with MouseSwitching materials at runtimeCapturing a screenshotEntity picking using physicsCreating Rigid Bodies in CodeUsing events with scriptsCompound Physics ShapesSmooth camera movementFading objects in and outTutorial: Plasma Shader Chunk3D Gaussian Splat Physics and RelightingDynamic UI Scroll ViewWebXR: Plane DetectionBillboardsSimple water surfaceWebXR AR: Hit TestFlaming fireballSimple shape raycastingSound volume control using curveEntity picking without physicsLoading an asset at runtimeWorld to UI Screen spacePlanar Mirror ReflectionAnimation without State GraphMultitouch inputDetecting a double tapShockwaveWebXR Tracked ControllersCamera model maskingWebXR HandsLocking the mouseLoad assets with a progress barMultiple Viewport RenderingDetecting a long pressDetecting a double clickSpace Rocks!WebXR Controller/Hand ModelsLoading Draco Compressed GLBsPhysics with CCDPlace an entity with physicsTutorial: Shop User InterfaceResolution ScalingWorld space UI rendering on topWebXR AR: DOM OverlayVHS/CRT Post EffectRender 3D World to UIStatic BatchingTimersRainbow Trail with Mesh APILoading Circle UITutorial: Layout GroupsSwitch Full SceneLoad multiple assets at runtimeStencil Buffer - 3D Magic CardTutorial: Normal Mapped TextMultiple Camera LayersPan Camera to TargetVignette AberrationMobile UI Safe AreasPhysics raycasting by tagCreate QR Code at runtimePlace entity without physicsTic Tac ToeProcedural Gradient TextureWebXR AR Raycasting ShapesRaycast with Camera Viewports3D Gaussian Splat AnnotationsRight to left language support