Here's an example of why intuition matters when working with AI. I found a glari...
bscross32 @bscross32@tweesecake.social
Here's an example of why intuition matters when working with AI. I found a glaring inaccuracy involving the vehicle scanner in my BeamNG mod which presented itself when a vehicle is severely damaged. I was getting two separate readings, one for neutral and forward gears, and one for reverse. the first reading was 0, the second was 477ft. I was assuming the latter was correct, but in fact, neither one was.
This game is called BeamNG for a reason. Nodes and beams are how vehicles are made. Beams connect nodes together, so when you break parts off a vehicle, nodes are detached and those parts can fly however physics dictates they should. Now, the vehicle scanner is trying to find the front of the source vehicle (the one you're driving) and match it up with the nearest node of the target vehicle, this way, whether you want to hit a vehicle or simply follow along behind it, you can. It didn't used to work this way. Before, it would use the centermost node of each, which would present inaccurate information.
This all comes together given there are two damaged vehicles in my scenario. The vehicle scanner did not know where the actual main mass of the vehicle was. It was finding a cluster of nodes, but that cluster was just debris. In a forward gear or neutral, it was seeing that a piece of debris was stuck to my vehicle, but in reverse, it uses a different model so you can back up into another car or alongside it.
The AI planned to spawn a bunch of vehicles, damage them, and compare clusters of nodes. This may have worked in some situations, but depending on the level of damage, it may have lead to more false readings. However, I could tell this was a rabbit hole in the making and I didn't want to go down that path, so I instructed it to read the game's files. In doing so, not only did it find the ref node which is basically a "here I am" identifier so that when nodes are detached, the game can still identify where the actual vehicle is, but it also found a signal we can listen for when nodes are broken. This signal allows us to update our cache of the geometry of the vehicle whenever the game tells us that something broke. We can then use that data to figure out where the vehicle is, and exclude parts that broke off from the scan both because we don't want our scanner to lock onto a bumper that's since departed from the vehicle, and because we don't want vehicle debris included in the scan at all.