Complex collision for vehicles is now a thing.
Traditionally, GoldSrc uses AABBs (axis-aligned bounding boxes) to check for collision between point entities.
(keep in mind that these aren't accurate representations of their bounding boxes, but they are close enough)
There is a bit of a problem with AABBs though...
They cannot be rotated. Sure, that makes collision detection really easy to solve, simply check the minimum and maximum XYZ values of both entities, but my vehicle system is gonna need something better.
One might wonder, how did monster_tentacle handle its collision then? You can even get stuck in the tentacle if it touches you!
Its bounding box is otherwise HUGE, so no way that is being used.
The answer is: hitbox collision.
I once heard about a certain flag in models, which lets them use complex collision via hitboxes (CCHB for short from now on).
It took me a good while to get this working. Anybody I asked about it, they used Svengine for their mod so it automatically meant things are gonna work better. But I wanted to see how I could get it working in vanilla GoldSrc, because there was clearly at least one entity capable of utilising this collision system.
The work eventually paid off. Here it is on the bike vehicle:
videoYou can notice that grenades bounce off the hitboxes, the player gets blocked by the hitboxes and so on. For collision with the map geometry, it still uses its AABB (hardcoded in the engine, probably, so I can't change that).
This is great news for at least two things:
1. Static props
2. Vehicles
For static props, this means you don't have to overlay them with CLIP brushes any more. Saves time for the mapper, and saves clipnodes too. Slightly more work for the modeller tho'. :/
For vehicles, this means players won't get blocked by some invisible matter if the vehicle is turned by 45° or so.
And that's about it for this small update. uwu