Page 1 of 1

Pathfinding and Steering

Posted: Tue Aug 15, 2017 2:43 am
by assofohdz
Hi

I was wondering if there's any plans to incorporate pathfinding and steering into Dyn4j? I know that lib-gdx has the gdx-ai lib - and was wondering if it's conscious decision to keep it out :)

Re: Pathfinding and Steering

Posted: Tue Aug 15, 2017 4:03 am
by zoom
It seems better to keep the physics separate from other concerns and not bolt everything into the dyn4j-jar.

On the other hand it would be great if all the java libraries could converge on the same set of 2D/3D-primitives. It gets pretty tiresome to convert one vector2d to another librarys vector2d. To bad vecmath never got traction but maybe JOML is an alternative. https://github.com/JOML-CI/JOML

Re: Pathfinding and Steering

Posted: Tue Aug 15, 2017 4:55 am
by assofohdz
I agree on keeping it seperate. I just wondered since all the shapes are already there, maintaining a navmesh wouldn't be too hard. I know it's not by any means easy.

Re: Pathfinding and Steering

Posted: Thu Aug 17, 2017 2:11 am
by assofohdz
I tried having the Body class implement the Steerable interface (from gdx-ai), but since the Vector2 classes are different (between gdx-ai and Dyn4j), the interface overrides clashes because of return types and method names. So I basically have to create a seperate class to bind the Steerable to the Body. Relates to what you said about primitives... Would be easy to implement the interface if the primitives were the same :D