[Request] Car+Pathfinding

Post your work in progress addons and get feedback

Post » Tue Feb 17, 2015 4:51 am

@rexrainbow

This looks really complicated, I love being new at stuff, gonna take me a minute to figure all this out, I'm unsure exactly what behaviors you used on the vehicles, I assume LJPotential, Car, and Solid, but they don't appear in the actual behavior editor, maybe it's an advanced thing I'm unfamiliar with lol.

As for the waypoints, I found the template that inserts arrows into the pathfinders path that the player auto follows, I could use that same logic to create waypoints that follow the logic used by your waypoints system. The mapping for my first attempt will be mainly grid based, so north/east/south/west direction.

I'm going to be building the main traffic flow on events, and using your system for special events like racing and such.

I think I have to take a step back and figure out the objects you've used so I can emulate this, unless I can reverse engineer this I'm learning nothing, even the layout of your objects seems more advanced then I'm even aware of.

Either way, I believe this is perfect for my project with some workaround to create instances of the waypoints along a pathfinders path. Thanks for your assistance :D
B
5
Posts: 22
Reputation: 271

Post » Tue Feb 17, 2015 4:59 am

@Cyles

If there is only one attracting source, and no rejecting. You might easy to turn the head of car toward this attracting source. It does not need LJPotential actually.

Edit
I forgot you might want to reduce the car accident, so the rejecting still need.
B
104
S
25
G
214
Posts: 4,283
Reputation: 122,578

Post » Tue Feb 17, 2015 5:07 am

@rexrainbow

For the pathfinding, I would be using every tick to re-calculate the path to take, and destroying and replacing the attracting points, because it will use pathfinder logic, it will avoid other cars and buildings set as solid by default, but will still potentially sideswipe other vehicles, causing damage to the car using collision depending on friction, drift recovery, steer speed, etc causing damage to the car.

The basic logic on how I'm going to do it is there, I just need to figure out how to use these custom plugins/behaviors properly.

Edit: I'm gonna leave my mistake and simply point out that I'm from the department of redundancy department. LOL
B
5
Posts: 22
Reputation: 271

Post » Tue Feb 17, 2015 5:16 am

@Cyles

You should also avoid pathfinding every tick, since this will cause extremely high CPU usage and also increase the amount of time it takes for other objects to determine their paths.


The path finding is an asynchronous action, so you will not get the result immediately.
B
104
S
25
G
214
Posts: 4,283
Reputation: 122,578

Post » Tue Feb 17, 2015 5:36 am

Ahh, So if I use it on 1-2 objects (competitors in a race) to navigate through bullet behavior solid traffic, and buildings, would bog down too much? Or simply not be suitable for finding alternate paths on the fly.

Is there an improved pathfinding system that would suit the on the fly re-calculation of navigation points, or am I simply going about this the wrong way.

Maybe what I could do is create pre-located instances that spawn during certain missions, was kinda hoping for the whole random destination thing.
B
5
Posts: 22
Reputation: 271

Post » Tue Feb 17, 2015 9:54 am

@Cyles

Path finding might not be a good idea for car moving. Because that the path finding is grid based, it might turn left/right with 90 degrees. This kind of path might be strange in real car behavior.
B
104
S
25
G
214
Posts: 4,283
Reputation: 122,578

Post » Tue Feb 17, 2015 4:22 pm

@rexrainbow

So there's no real way to make AI vehicles then without using LJPotential?

This is why I was asking about pathfind + Car Physics, find the path via pathfinding, and use car physics, it's ok if a car turns 90 degrees, but I want it to use the car physics to achieve it, potentially smashing into buildings/other vehicles as it slides getting it's drift recovery.
B
5
Posts: 22
Reputation: 271

Post » Wed Feb 18, 2015 12:45 am

These are two different problem.
One is using LJ potential to decide the command of car, another is using path finding to find a possible path to target position.
B
104
S
25
G
214
Posts: 4,283
Reputation: 122,578

Post » Wed Feb 18, 2015 1:58 am

maybe I'll hire someone to create a plugin specifically for this with the variables I require to achieve realistic AI driving using a similar solution to pathfinding that handles car waypoints.

Thanks for directing me to your plugins tho, once I learn this program a little better I'm sure I will find many uses for them.
B
5
Posts: 22
Reputation: 271

Post » Thu Jan 07, 2016 11:21 am

Cyles wrote:maybe I'll hire someone to create a plugin specifically for this with the variables I require to achieve realistic AI driving using a similar solution to pathfinding that handles car waypoints.

Thanks for directing me to your plugins tho, once I learn this program a little better I'm sure I will find many uses for them.

This might be of use? viewtopic.php?f=178&t=166529&p=1004788#p1004788
B
38
S
12
G
14
Posts: 1,093
Reputation: 11,115

Previous

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 0 guests