LOL, don't hang yourself... :'(
I was just saying that the drunk mouse doesn't know which way is forward, or if he is even on the track. (I know you were just playing with the feelers. I was being a smart {Fill in bad word here}.)
The "Distance", value in the formula... Which is +(distance), and I put +(distance*10).
You are setting a specific distance, over a timeframe... (Distance is (speed over time)) which you than again, divide by time... (You add the distance form the point to the speed, and then divide by time?)
Distance form the point should be used to adjust speed, only when the distance from the point is within range, and only if adjustment is required. (I am not sure why you add the distance from the target, to the target PUSH value.)
MIN(slow,fast) will not be good for actual game-play... because that turns the player into a brick-wall if you collide into them. When you are hit from behind, you move faster than your max-speed, and 0 is min? (I may not understand the implementation of that code, but multiplying the distance * 10 was the only solution that produced realistic motion, no matter what speed the vehicle was moving. I am starting to think that is just a generic code you use to test... but I thought it was part of the AI code, which would be moving the other players.)
I am working on the physics values, which you should be able to use without having to re-formulate for every style of sensor calculation. You only have to output the FORCE modification of the sensor/control. I will make a separate post for GAME PHYSICS, since they are not specific to AI, but part of it.
I LOVE the sensors... I just didn't understand how they work, and the movement code was not helping me understand, since it stopped the mouse as it was trying to move forward.
I still don't understand how this code knows if it is going the correct direction. (Without way-points, it will still take the shortest path, if it can feel its way there. Like at an intersection where it could be bumped onto a shorter destination, or if it were flipped out of the track, onto the scenery.)
Bookmarks