Release: Orestis 3D Pathfinding 2.0.0

A complete rework from scratch using a Web Assembly port of the popular Recast/Detour library.

Easily create navigation zones, groups of agents and dynamic obstacles using editor scripts. Minimal code required to control the pathfinder!

Give it a try here!

Features:

  • Very fast navigation mesh generation on runtime.
  • Recast config easily accessible with script attributes.
  • Create customizable agents that can be easily grouped in crowds.
  • Easily add dynamic obstacles in editor and on runtime.
  • Easy to use event based API.
  • A full sample project is provided with purchase.
    v2.0.0

Get it in our PIC store: https://pic.pirron-rodon.one/

Screenshot 2021-03-24 110200

Screenshot 2021-03-24 110141

13 Likes

Epic work @Leonidas!

1 Like

A minor new version has been released, changes:

  • Added a new Orient Inertia parameter to control how smoothly the agents change direction.
  • Reworked the orientation logic to use the current velocity instead of the next point on the path to remove orientation jitter.
    v2.0.1

Live demo: https://playcanv.as/p/L0Cbf2E3/

image

You can grab the new script files from your PIC account:
image

If you are adding them to a new project don’t forget to reference the WASM module like this:

image

Extension available to purchase here: https://pic.pirron-rodon.one/

2 Likes

Another minor version has been released, changelog:

v2.0.2

  • Added method to stop the crowd or specific agents.
  • Added property to automatically stop an agent at a certain distance before reaching its target.
  • Added a sample script on how to get the active velocity of an agent.

Live demo: https://playcanv.as/p/L0Cbf2E3/

Extension available to purchase here: https://pic.pirron-rodon.one/

image

4 Likes

A minor update, changelog:
v2.0.3

  • Added a method to allow teleporting agents.
  • Exposed the query extent recast parameter as an easy to update editor attribute (can be updated on runtime as well).

Live demo: https://playcanv.as/p/L0Cbf2E3/

Extension available to purchase here: https://pic.pirron-rodon.one/

2 Likes

Works great!
I’d be nice to have a button to display the generated navmesh as well, if possible, in the demo.

Ah good idea, we will add it in the next release, thanks @mvaligursky!

A follow up minor release:

v2.0.4

  • Fixed bug with teleport method resetting an agent position when no valid nav mesh point is found.
  • Fixed nav mesh garbage collection when a new one is generated.
  • Fixed obstacles not reinitializing when a new nav mesh is generated.
  • Added navmesh display button on the demo (@mvaligursky)

Live demo: https://playcanv.as/p/L0Cbf2E3/

Extension available to purchase here: https://pic.pirron-rodon.one/

1 Like

Fantastic, glad to see this. Minor suggestion - the navmesh is white, and the path lines are white … perhaps some small color tweaks?

Good point! We may also add some transparency on the navmesh, it may help debugging close corners. Thanks @mvaligursky!

Hello, @Leonidas

Great job on that one, i was looking for pathfinding a while ago and could not find it. I was wondering if this purchase comes with future updates or is sold only in its current state without oncoming updates

Hi @smokys, yes you get access to any new version released.

Hello guys, do you know how to add agent to crowd dynamically from script?

i used manual way:

        const crowd = self.app.root.findByName('Crowd');
        crowd.script.orestisCrowd.crowd.agents.push(obj);

but in that case i have an error of

that errors seems related to some line rendering

yes, but it is in system file

Hey @Dima_Romanchuk, yes it’s definitely possible. I’ll follow up later with the exact approach.

@Dima_Romanchuk,

Make sure you have a reference to an agent entity. That is an entity that has the orestisAgent script attached:

From there your code will work, just make sure to not push directly to the agents array, but set it anew:

const crowd = self.app.root.findByName('Crowd');
const agents = crowd.script.orestisCrowd.crowd.agents;
agents.push(newAgentEntity);
crowd.script.orestisCrowd.crowd.agents = agents;

Excellent work, the pathfinder system works correctly.

But I have a problem, when adding new agents in real time there some problems, even manually from the editor.

If the variable agents is altered (even without adding) all the agents position are returned to zero.
And if you try to get them to go to a new destination, when they reach the destination, if the StopDistance is > 0, all the agents disappear.

It can be reproduced easily adding this code.

this.app.keyboard.on("keydown", this.onKeyDown, this);

ClickGoToPoint.prototype.onKeyDown = function (event) {
    if (event.key === pc.KEY_B) {   
        var crowdEntity = this.app.root.findByName('Crowd');

        const agents = crowdEntity.script.orestisCrowd.agents;
        crowdEntity.script.orestisCrowd.agents = agents;
    }
};

I’ve been trying to fix it for hours without success. I don’t know how the code works exacly, I suspect is related with onAddAgent. Can you provide a solution? maybe some way to move an agent directly without the agents array.

Hi @Leonidas! I noticed there is no support for the new Render component yet. Any idea when there will be a new update?