thanks jean,
yes i think junctions could actually be doable with just triggers, and then just writing the logic of what happens when these triggers are triggered
basically 1 trigger per lane, so if i had normal junction with 4 directions... i would have 8 triggers... basically each lane would have one trigger before junction starts, and after it ends, so that it detects when the car crossed junction, so that the next car can go... right now, this sounds like the best idea in my head
if that will be too hard to do, then i will just use junctions with traffic lights, haha
and i think i will only send 1 raycast out from car... just 1 ray from front of the car, 2 meters range, something like that... i think just 1 ray is fine...
i might need to put more rays into the car if they will have switching lanes mechanics... but those sideway rays will only be turned on if the car will actually want to switch lanes, otherwise they would be off.
for cars movement, i will probably just use translate function... just something that moves cars along iTween paths... it might look a bit weird with corners, since that is not how cars behave in corners. (they steer with front 2 tires, and dont pivot around center like tanks do)... but i think it will look fine for mobile use...
problem with using edy's physics for AI, is that it doesnt scale very well... for 1 car it is ok, but when you add 20+ cars there it cripples phones fps
you can check here in the end of the video:
ur right, first i will do junctions with traffic lights, since that is the easiest, and get the movement on itween paths correctly, and then go into junctions without traffic lights... i will try to do all that in next couple of days, and i'll report back
-----------
in the end... it just comes down to proper logic behind it... if you have the proper logic in ur head, then its quite easy to do it with playmaker...
yesterday, i was doing breaking velocity mechanic, it basically checks if bus has been breaking for too long, that means that the driver is breaking too hard, so passengers will be unhappy with that much breaking...
so i have a float variable from 0-100, and the longer you hold break button, the higher that value goes, and once you release break button, it quickly goes down to 0 again... so its basically "velocity meter" ... oh boy i have been solving that one for 2 hours... trying all different complex things, cracking my head with it, almost giving up... and then i solved it with most simplified thing ever...
float add action, and wait action. so when you are holding break button, every 0.1 seconds, it adds +3 to float variable... and that fills up velocity meter, and once you release it, it subtracts 10 velocity every 0.1 seconds...
just so simple thing to do... if i only had the right logic at the beginning...