FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
0048 — CNorrbinTanker applies ScaleX/Y/Z to a loaded scene's root node and again to each of its child nodes
ID 0048
Class BUG
Severity 1
Status blocked
Models Vessels/Tanker
Found 2026-09-26, resolving BASE-0047
Decision needed Should ScaleX/Y/Z scale a loaded scene once, and should a scene file's own node scales be kept?

Evidence

src/vessel/CNorrbinTanker.cpp:363-373 at 1c52c95, after parseDotScene has attached the scene's nodes under m_pRenderNode: m_pRenderNode->setScale(scaleX, scaleY, scaleZ), then the loop over m_pRenderNode->getChildren() does my_node->setScale(scaleX, scaleY, scaleZ) on every child as well. Ogre nodes inherit their parent's scale by default, so each child is drawn at ScaleX², ScaleY², ScaleZ². setScale also replaces the <scale> that DotSceneLoader::processNode read from the scene file for that node (ogrederived/src/DotSceneLoader.cpp:416).

Code trace only: no .scene file exists to run it with (BASE-0047).

Effect

A scene given with Scene and ScaleX="2" is drawn four times as large, and a scene whose top-level nodes carry their own scale loses it.

Possible fix

Drop the loop, so the follow node's scale is the only one applied; or drop the follow node's setScale and keep the loop, which keeps the square-free result but still overrides the file. Which one the original scenes expected is for the model owner.

Test that would prove it

A small .scene with one scaled node, loaded with ScaleX="2": the node's derived scale is its own scale times 2.

Risk

Any existing .scene tuned to the current squaring would change size.