rickomax / psxprev

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

Limbs move twice as far when translating root entity #62

Closed trigger-segfault closed 1 year ago

trigger-segfault commented 1 year ago

Describe the issue: When attached limbs are enabled and you translate the root entity, limb vertices will translate twice the distance the root entity was translated. Instead they should translate the same distance as the root entity.

I only have HMD models, so I can't confirm if this is an issue with PSX limbs too.

Solution: I think this is because attached vertices are transformed by WorldMatrix when they should be using LocalMatrix. This is because parent world matrices are already being applied to vertices during rendering.

Note that there's no issue of LocalMatrix being applied twice, because shared models aren't related to the attachable model's local matrix, and don't have any transform of their own to apply.

trigger-segfault commented 1 year ago

This has been fixed by PR #63.