Moving in 2d top down with physics instead of navmesh

nicmar

New member
Hey!
I worked with the movement pack and behaviour designer in our game for about a year ago, and since worked with other aspects of out game, but now I'm back and want to get some sweet AI going for our 2d top down space sequences.

So my first question, how do I start to setup so that the movement, tactics and formations packs work with forces instead of simple path finding? As we're using physics for many things in our game, i feel that's necessary.

I'm looking into using a PID controller, but haven't implemented anything so far, so I guess the different behaviours still find a point to go to and a rotation, then I would need a script to move the ship using physics instead of a navmesh component.

I just want to know if there is anything ready for this, so I don't reinvent the wheel :)

Thanks!
 
For this you'll want to implement a new set of tasks using the abstract base class BehaviorDesigner.Runtime.Tasks.Movement.Movement. All of the tasks included in the Movement Pack use some sort of pathfinding.
 
Thanks! After giving it some thought, I was thinking of using the polynav2D tasks as a reference, to get a path of nodes, then use a PID controller to traverse that path using physics. Does that sound like a good idea?
 
Or maybe I should just use the A* pathfinding, as I will not use polynav2d for actual movement?
 
It does sound like you want to use A* Pathfinding as it is more flexible. From the Movement Pack side of things it doesn't do the actual movement - that's up to the underlying pathfinding implementation. So if you can move the agent with physics within A* you shouldn't need to create any new tasks.
 
Thanks! After giving it some thought, I was thinking of using the polynav2D tasks as a reference, to get a path of nodes, then use a PID controller to traverse that path using physics. Does that sound like a good idea?
I am looking for an answer around this and have not been able to find any other relevant thread. Do PolyNav2D and Behavior Designer work together? I cannot find any answer and would love if anyone could point me in the right direction to get these 2 assets working together for 2D movement. If there is another (better) way to handle 2D navmesh movement/AI, I am open to ideas. :)

Also, I am using the Movement Pack and it should be integrated from what I can see here:


But again, I have no idea if this is relevant info or not and could really use some guidance. Thanks!


-----------------SOLVED--------------------------

In case anyone else sees this, it wasn't immediately obvious to me but you have to download an addon from Opsive after entering your invoice number. I have started down the path of this starting to work. :)
 
Last edited:
Top