In GTA San Andreas, small planes are periodically created near the player to perform a fly-by.
Sometimes they crash.
Before creating the plane, my code looks for obstacles in its path.
It scans a number of lines in the forward direction of the plane. These scans are slow so I used the absolute minimum. (Just the body and wingtips I believe) This is why thin obstacles are sometimes not detected.
In addition, the planes would sometimes loose some height, right after being created because their initial speed may not have generated enough lift.
There was an additional problem when map models were not streamed in yet. Their collision would be loaded after the plane had already been created.
These issues would occasionally allow planes to be created on a doomed flightpath.
I was aware of the crashes and briefly considered removing the fly-by’s altogether.
In addition:
@__silent_ just pointed out there was an actual bug in the code. I didn't know that.
https://t.co/yU2obVpTfU
https://t.co/AsJYzjmkei
https://t.co/5JXbV3aPl9
#gta #gamedev
So sad to hear David Prowse has passed. He was a kind man & much more than Darth Vader. Actor-Husband-Father-Member of the Order of the British Empire-3 time British Weightlifting Champion & Safety Icon the Green Cross Code Man. He loved his fans as much as they loved him. #RIP
Danke, @kafaefendi, für die 12.767 Minuten, die wir dieses Jahr zusammen auf @SpotifyDE verbracht haben. Meine absolute Nr. 1. #2020Wrapped https://t.co/KacCnKrKWR