|
Post by MonstaWolf on Sept 3, 2015 12:09:27 GMT
Hi, sorry I haven't posted in a while. Been busy.So, the traffic system is (pretty much) complete, big thanks to Power. I'm attempting to create cop cars that are hard to get away from. I have the CarAI set up like this: -I have a path attached to my car, with a single node. -I duplicated the city and moved it down a bit, so only the buildings would be above ground (You can't see them though, they're just rigibodies for collision detection.) -I have the CarAI set to follow the path (as a path, of course ) -The buildings in the city are set to be avoided, which means it may be also trying to avoid the secondary ground beneath the map. I believe that may be the problem. (Read below)So, as I drive throughout the city, the car chases me, and successfully avoids most buildings, and is able to stay right on my tail. But, when it comes to straightaways or setting the speed of the cars higher, the AI car begins to steer left and right rapidly, causing it to slow down a great bunch and allows me to get away easily. I could send screenshots of the AI and Car settings if needed.
|
|
|
Post by F1Andre on Sept 3, 2015 13:20:34 GMT
This can happen if your ai car is set to be more precise or if you path nodes are to close to each other. As a result the ai car will try and reach/cross each node. It also happens when driving slow but you just don't see it becuase the movements are so small.
I suggest that you create different paths for different speed ranges. The higher the speed the less nodes, you have to do it just right otherwise the car will jerk to the side when it enters or exits a speed range.
--Andrรฉ
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 3, 2015 13:24:18 GMT
you can also set the the node recording time to something less, so it records the node every 0.4 seconds, that way you can drive as fast as you want
|
|
|
Post by MonstaWolf on Sept 3, 2015 14:20:25 GMT
This can happen if your ai car is set to be more precise or if you path nodes are to close to each other. As a result the ai car will try and reach/cross each node. It also happens when driving slow but you just don't see it becuase the movements are so small. I suggest that you create different paths for different speed ranges. The higher the speed the less nodes, you have to do it just right otherwise the car will jerk to the side when it enters or exits a speed range. --Andrรฉ I think u may have misunderstood. I want the AI car to chase the player, yet avoid other objects. I attached the path to the car with only one node on it, so the AI car would always be trying to go to the first node, which is the player car.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 3, 2015 14:33:04 GMT
link it with the objects you want to avoid and set them as obstacles/targets and set AI mode to Avoid,, and make another ai and set it to chase making the player car as Obstacle/Target
|
|
|
Post by MonstaWolf on Sept 3, 2015 14:33:40 GMT
link it with the objects you want to avoid and set them as obstacles/targets and set AI mode to Avoid,, and make another ai and set it to chase making the player car as Obstacle/Target Wait, you can do two CarAI's on the same car?
|
|
|
Post by F1Andre on Sept 3, 2015 14:36:07 GMT
Okay then, then as the speed increases you must decrease the number of nodes created for your ai to follow as you drive in the game.
|
|
|
Post by MonstaWolf on Sept 3, 2015 14:39:00 GMT
Okay then, then as the speed increases you must decrease the number of nodes created for your ai to follow as you drive in the game. The thing is, though, there is only one node, which is the player. The player is practically a moving node.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 3, 2015 14:41:53 GMT
whats in trying, cause you cant set one ai to chase and to avoid at the same time, without scripting skills, power has them..
|
|
|
Post by MonstaWolf on Sept 3, 2015 14:44:06 GMT
whats in trying, cause you cant set one ai to chase and to avoid at the same time, without scripting skills, power has them.. Yeah, I'll try it later as I'm im class atm. I'll let you know if it worked
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 3, 2015 14:45:53 GMT
alright, let me know
|
|
|
Post by MonstaWolf on Sept 3, 2015 15:01:21 GMT
It didn't work, the car just goes in a circle
|
|
|
Post by MonstaWolf on Sept 3, 2015 15:32:12 GMT
Any other possible ways to do this?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 3, 2015 16:02:13 GMT
try this and tell me the result, then we will look for some other way
|
|
|
Post by MonstaWolf on Sept 3, 2015 18:45:27 GMT
I told you the results already, but since I posted twice, you may not have seen the first reply. I said that the car either does endless doughnuts where it spawns or does no action at all.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 4, 2015 1:16:42 GMT
I will take a look at that
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 4, 2015 10:41:08 GMT
the car is not going in circles but its actually chasing you, i think that 3d rad A.I. gives more importance to 'chase' than to 'avoid'
what else did we expected, if you select the mode 'Chase' instead of 'avoid' due to the high priority of the chase function it will just start chasing your car... instead of focusing on the race.
the car does not know how to reverse so it takes a full circle to reach to you..
there needs to be some other way too..
|
|
|
Post by MonstaWolf on Sept 4, 2015 14:19:06 GMT
the car is not going in circles but its actually chasing you, i think that 3d rad A.I. gives more importance to 'chase' than to 'avoid' what else did we expected, if you select the mode 'Chase' instead of 'avoid' due to the high priority of the chase function it will just start chasing your car... instead of focusing on the race. the car does not know how to reverse so it takes a full circle to reach to you.. there needs to be some other way too.. I think I forgot to mention that this is supposed to be a cop car, and is meant to merely chase the player while avoiding obstacles such as buildings and traffic.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 4, 2015 16:56:26 GMT
no you didn't forgot to mention that, i am still thinking of a way to make it chase and also avoid the obstacles at the same time, a lot of Tripe A games don't have the feature, a smart cop car might also be almost impossible to get away from ... maybe, i need to think it over. i have played a lot of stupid car ai games too, like in NFS carbon they are very very less likely to avoid a roadblock..
|
|
|
Post by MonstaWolf on Sept 4, 2015 18:45:17 GMT
no you didn't forgot to mention that, i am still thinking of a way to make it chase and also avoid the obstacles at the same time, a lot of Tripe A games don't have the feature, a smart cop car might also be almost impossible to get away from ... maybe, i need to think it over. i have played a lot of stupid car ai games too, like in NFS carbon they are very very less likely to avoid a roadblock.. Lol, the way need for speed did it was by adding a ton of cars, and I suck at render distances... I was thinking more Midnight Club style where there are 3 or 4 cop cars with good AI that know how to get around buildings.
|
|