Skip to content

Fix typo that breaks 3d object scaling in RMBLayout.cs#2566

Merged
KABoissonneault merged 1 commit intoInterkarma:masterfrom
drcarademono:master
Jan 28, 2024
Merged

Fix typo that breaks 3d object scaling in RMBLayout.cs#2566
KABoissonneault merged 1 commit intoInterkarma:masterfrom
drcarademono:master

Conversation

@drcarademono
Copy link
Copy Markdown
Contributor

@drcarademono drcarademono commented Jan 26, 2024

Modders working with RMBs have known for a long time that rescaling 3d objects will break them. Either the scale will be wrong or objects will disappear entirely when scaled. The screenshot below demonstrates this bug with a modded RMB but otherwise unmodded game:
Screenshot from 2024-01-25 20-58-56

This bug turns out to be caused by a typo in the GetModelScaleVector method, in which obj.ZScale is incorrectly set to obj.YScale on line 76. Correcting this typo fixes the scaling bug:
Screenshot from 2024-01-25 20-57-23

@KABoissonneault
Copy link
Copy Markdown
Collaborator

KABoissonneault commented Jan 26, 2024

Not terribly comfortable with changing this at first glance, but I have to assume nothing in DF data actually has a Y scaling that differs from Z scaling, or else we would have seen this before. If so, that change seems fine

Maybe I could write a script that traverses all DF models and ensures that my assumption is correct

Affected DF objects:

  • RMB Block Subrecord Exterior Block3dObjectRecords
  • RMB Block Subrecord Interior Block3dObjectRecords
  • RMB Block Misc 3d Object Records

@drcarademono
Copy link
Copy Markdown
Contributor Author

Grep searching for the string "Scale" in a folder with all RMB jsons extracted from DF data shows that vanilla Daggerfall objects are never scaled at all. This change should only affect modded RMBs.

@KABoissonneault KABoissonneault merged commit 39fba8f into Interkarma:master Jan 28, 2024
@KABoissonneault KABoissonneault mentioned this pull request Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants