CodeKnight | Pathfinder

This template is designed to guide your entities smoothly through your PlayCanvas scenes. It automatically generates a navigation mesh based on the entities in your scene.

Our ladder climb system allows your characters to effortlessly navigate between different heights, a crucial feature for games that need vertical movement as well.

With the plug-and-play setup, integrating to your PlayCanvas project should be a breeze.

The public Character script for your characters works seamlessly with our private controller.

// Add a character to the pathfinder
addCharacter(script) {
    pathfinder.addCharacter(script);
}

// Set the destination of your character
setDestination(position) {
    pathfinder.setDestination(this.character, position);
}

// Set the speed of your character
setSpeed(value) {
    pathfinder.setSpeed(this.character, value);
}

// Get the speed of your character
getSpeed() {
    return pathfinder.getSpeed(this.character);
}

// Get the state of your character
getState() {
    return pathfinder.getState(this.character);
}

// Recieve events from the pathfinder
events(event) {
    // Exmample of manipulating the event based on speed
    if (event === 'Moving') {
        if (this.getSpeed() > 3) {
            event = 'Running';
        }
    }

    // Example of using event to apply the desired animation
    this.entity.anim?.baseLayer?.transition(event, 0.2);

    // Example of showing the event in the console of browser
    console.log(event);
}

Looking ahead, we’re also working on an optional Character AI that will bring automated behavior for even smarter navigation. This will be available separately for those who need it.

Key Features:

  • Easy plug-and-play integration for PlayCanvas
  • Automatic NavMesh generation from your scene
  • Ladder climb system for vertical traversal
  • Pathfinder script to configure navigation settings
  • Character script for the characters in your scene
  • Optional Character AI for smarter automation

Got ideas or feature requests? Let us know what you’d love to see!

We will share a link to our website when the template is available for purchase.

9 Likes

I’m looking for one or two users who would like to test my template soon.

The process to be tested:

Visit website → Purchase via PayPal → Receive and apply license code → Set up and use template

As a thank you, you’ll be refunded the purchase amount (likely €10 for a personal license) and may keep using the license for non-commercial projects.