Phaser Virtual Joystick Overview

Touch-friendly virtual joystick component for mobile Phaser 3 games.

Phaser Virtual Joystick

Touch-friendly virtual joystick component for mobile Phaser 3 games. Perfect for mobile game controls and touch-based interactions.

Key Features

đŸ•šī¸

Touch Controls

Intuitive touch-based joystick controls for mobile devices

📱

Mobile Optimized

Designed specifically for mobile game development

đŸŽ¯

Precise Input

High-precision input with smooth analog movement

🎨

Customizable

Fully customizable appearance and behavior

⚡

High Performance

Optimized for 60fps gameplay on mobile devices

🔧

Easy Integration

Simple API for quick integration into existing games

Perfect For

Game Types

  • â€ĸ Platformer games
  • â€ĸ Action-adventure games
  • â€ĸ Racing games
  • â€ĸ Puzzle games with movement
  • â€ĸ Any game requiring directional input

Features

  • â€ĸ Analog movement input
  • â€ĸ Dead zone configuration
  • â€ĸ Visual feedback
  • â€ĸ Multi-touch support
  • â€ĸ Responsive design

Quick Start

import { VirtualJoystick } from 'phaser-virtual-joystick';

class GameScene extends Phaser.Scene {
  private joystick?: VirtualJoystick;
  private player?: Phaser.GameObjects.Sprite;

  create() {
    // Create virtual joystick
    this.joystick = new VirtualJoystick(this, {
      x: 150,
      y: this.cameras.main.height - 150,
      radius: 50,
      baseColor: 0x333333,
      thumbColor: 0x666666
    });

    // Create player sprite
    this.player = this.add.sprite(400, 300, 'player');
    
    // Listen for joystick input
    this.joystick.on('update', (data) => {
      if (this.player) {
        this.player.x += data.x * 5;
        this.player.y += data.y * 5;
      }
    });
  }
}

Installation

npm install phaser-virtual-joystick

Phaser Virtual Joystick makes it easy to add touch controls to your mobile Phaser 3 games with minimal setup.