rickomax / psxprev

PSXPREV - Playstation (PSX) Files Previewer/Extractor
BSD 2-Clause "Simplified" License
193 stars 10 forks source link

Fix HMD limbs translating twice as far when moving root entity #63

Closed trigger-segfault closed 1 year ago

trigger-segfault commented 1 year ago

When translating the root entity, attached limb vertices from HMD models will translate twice as far. This is because I didn't include the WorldMatrix.Inverted() transform in, like what with was used with AttachableIndices.

A second fix has been added that ensures a model with no triangles, or all attached limbs will have its bounds translated based on its transform instead. This prevents the bounding box of the root entity from being stretched as the root entity is translated.


Preview of attached limb getting translated twice as far. image

Preview of bounds getting stretched because shared model bounds weren't being translated. image