I courld need some script help here, I have decided to make a Formula 1 game but The cars wont slow down when they turn in sharp corners. I wourld like to add a script that set break when The wheels are in a certain degree, is this possible? Courld Someone help Me with a script? Thanks....
AI car speed at turns is determined by the placement of nodes in the path as the help states 'In particular, the more nodes are defined, the slower the speed.' for natural speeds, i use rec mode frequency and drive at the speed i want, rather than manual node placement.
you could do it by scripting rigid's Path speed, but it's not how i'd do it, and with many cars it could cause lag, and if you aren't good at scripting it's not worth the bother.
Lurkers idea would be the best, but i know what you're looking for, i think i can do something. But the script can be basic or complicated where speed of the vehicle would need to be factored in , not just the wheel angle ... I'll look into it, give it a try for you, either it will work or it wont.. give me some time though, i've got a few things i'm doing right now @love74.
The other thing is, are you using AI to drive the car, if so, i'm not sure how or if the script will work if the AI ( script) is already in control..... let me look into it though, its an interesting idea.
@thelurker I didnt know that, the cars drive pretty good now but it looks like a "car track on", it is a good idea to remake the nodes but I had a hell of a job to make the cars drive at a slim street in Monaco! (LOL!)
@TinSoldier Wow, that seems cool. The problem seems to be that the car wourld just slow down in the corners and not really a bit before turn a sharp left or right, do You think there are any way to solve it? Perhaps I courld add some triggerzones before and in the turns? Why not try both options and give it a try?
@LOVE74 I tried effecting the AI to control the cars, it wont work, i also found if i turn off the AI then script can control the cars, but as soon as the AI are turned back on, you get undesirable effects. the triggers are of no use if the script cant adjust the cars. Sooo, i suggest you recreate the path and use more points in corners to slow down the cars.
You could rewrite / create a custom AI, but i wont be trying to do that