playcanvas-avatar-navigation

Implement physics-based avatar movement and camera control in PlayCanvas with Ammo.js.

2|1|Updated Mar 28, 2026
One-click install
npx skills add https://github.com/viverseofficial/viverse-sdk-skills --skill playcanvas-avatar-navigation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playcanvas-avatar-navigation
Source: https://github.com/viverseofficial/viverse-sdk-skills/tree/main/skills/playcanvas-avatar-navigation
Command: npx skills add https://github.com/viverseofficial/viverse-sdk-skills --skill playcanvas-avatar-navigation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes patterns (resource) and examples (resource) components.

What problem does it solve?

This skill addresses the complexity of implementing stable, physics-driven avatar movement in PlayCanvas while avoiding common engine crashes associated with Ammo.js lifecycle management.

Core Features & Use Cases

  • Physics-based movement: Provides WASD and fly controls with collision detection against 3D geometry.
  • Safe Lifecycle Management: Implements a deferred destruction queue to prevent fatal Ammo.js errors during entity removal.
  • Camera Integration: Includes a third-person orbit camera system that handles model swaps and scene transitions gracefully.
  • Use Case: Ideal for building interactive 3D web experiences where users need to navigate complex environments without triggering physics engine stack overflows or memory leaks.

Quick Start

Initialize the avatar navigation system by calling the spawnAvatar function with your application instance and target spawn coordinates.

Frequently Asked Questions about playcanvas-avatar-navigation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement physics-based avatar movement in PlayCanvas without crashing Ammo.js?

Physics-based avatar movement in PlayCanvas requires a deferred destruction queue to manage Ammo.js entity lifecycles safely. This approach provides WASD controls with collision detection while preventing fatal stack overflows during entity removal.

Why does Ammo.js crash when removing entities during PlayCanvas navigation?

Ammo.js crashes occur when physics entities are destroyed immediately during active simulation. This skill implements a deferred destruction queue that schedules entity removal safely, preventing fatal physics engine errors and memory leaks.

Can I use third-person camera controls with PlayCanvas 3D avatars?

Third-person camera controls in PlayCanvas are supported through an orbit camera system. This skill handles camera integration including model swaps and scene transitions gracefully during 3D avatar navigation.

Do I need specific PlayCanvas engine patches for mesh collider compatibility with Ammo.js?

PlayCanvas engine integration requires specific patches for mesh collider compatibility with Ammo.js. These patches ensure physics-based avatar navigation functions correctly when interacting with complex 3D geometry.

What's the best way to handle collision detection for 3D avatars in PlayCanvas?

Collision detection for 3D avatars in PlayCanvas is best handled using Ammo.js physics integration. This skill provides WASD and fly controls with collision handling against 3D geometry for stable web scene navigation.