szapp / GothicFreeAim

Free aiming for the video game series Gothic
https://gfa.szapp.de
MIT License
36 stars 4 forks source link

Humanoid NPC bounding boxes do not include head node #170

Closed szapp closed 7 years ago

szapp commented 7 years ago

Since collision detection of projectiles with NPCs is done based on the bounding box, shots through the head of human NPCs are ignored. This is because the head node is not part of the model, but has its own visual.

In a clever way the bounding box needs to be continuously enlarged. First idea is calling the following method of the bounding box with the head bounding box every frame, but that might be unnecessary overhead.

zTBBox3D::CalcGreaterBBox3D(zTBBox3D const &) 00544550 

This method might be the way to go, but it should rather be injected where the NPC bounding box is calculated.