mchrbn / unity-traffic-simulation

A Unity asset that lets you easily simulate very simple traffic into your scene.
263 stars 57 forks source link

VehicleAI doesn't recognize segment #21

Closed perihelium closed 3 years ago

perihelium commented 3 years ago

this is propably something I Wrote wrong in the script. I placed all my roades and when I place my car and put the vehicleAI and Wheeldrive on it it doesn't move, I think this is becouse it doesn't see the segment. do you have any way that I could fix this? Do I need a layer or tag on the segments?

I love what you have done. Regards perihelium

mchrbn commented 3 years ago

Hey, maybe it's because the detection threshold for segment is too low compared to your scene size. Select the Traffic System gameobject and there is a field called "Segment Detection Threshold", in my example scene it is set to 0.1 maybe try 0.5 (or higher). Let me know if that doesn't work!

perihelium commented 3 years ago

Hello, thank you for your rapid response. I tried some things like set the treshold higher but nothing worked. It is most definatly something that I am doing wrong but I just can't figure out what it is. you don't have to reply to this if oyu don't want to, I don't want to waste your time.

Regards perihelium

mchrbn commented 3 years ago

No problem, feedbacks help to improve the project :)

Did you try to copy a car from my example scene into your scene? If it works means your car configuration has some issue (if that's the case try to put the same values in your car gameobject as the value I have in my example cars), if not it is the traffic system.

Worst case, you can upload your project and I will have a look

perihelium commented 3 years ago

Thank you, it worked. I need to change a few things about the road becouse now it is a bit rough but it follows the path. thank you for helping me. Ceep it up.

Perihelium