StrataSource / Engine

Issue tracker for Strata Source
47 stars 2 forks source link

Bug: rotating instances causes rotation problems on billboard sprites. #1179

Open Trico-Everfire opened 4 months ago

Trico-Everfire commented 4 months ago

Describe the bug

When rotating an instance holding a billboard sprite (usually light entities), the billboard rotation doesn't seem to account for the instance being rotated.

Example video: https://github.com/StrataSource/Engine/assets/55441008/0cf78035-c1f5-4401-a37f-e1718c17efd6

Issue example map: sprite_rot_issue.zip

To Reproduce

open map. rotate instance. move around and see sprite billboard incorrectly.

Issue Map

test_02.vmf

Expected Behavior

for billboard sprites to account for instance rotation.

Operating System

No response

ozxybox commented 4 months ago

Noticed and figured out the cause yesterday. Leaving a note here if I forget to fix it…

I had to use some dumbed down logic to fix a recent bug with sprites after the camera refactor. That worked, but I forgot to factor in that hammer entities are local to their instance, not global. I need to either transform the position of sprite or go back and find a smarter way to do sprites again :P