Patch from Jim Wilson to fix model offsets:
Here's a patch to fix the offsets bug. The problem was the transform was just getting added to a local instance rather than being returned by the function.
This commit is contained in:
parent
8eb735d149
commit
bd5560605d
1 changed files with 4 additions and 4 deletions
|
@ -284,8 +284,8 @@ fgLoad3DModel (const string &path)
|
|||
}
|
||||
|
||||
// Set up the alignment node
|
||||
ssgTransform * align = new ssgTransform;
|
||||
align->addKid(model);
|
||||
ssgTransform * alignmainmodel = new ssgTransform;
|
||||
alignmainmodel->addKid(model);
|
||||
sgMat4 res_matrix;
|
||||
make_offsets_matrix(&res_matrix,
|
||||
props.getFloatValue("/offsets/heading-deg", 0.0),
|
||||
|
@ -294,7 +294,7 @@ fgLoad3DModel (const string &path)
|
|||
props.getFloatValue("/offsets/x-m", 0.0),
|
||||
props.getFloatValue("/offsets/y-m", 0.0),
|
||||
props.getFloatValue("/offsets/z-m", 0.0));
|
||||
align->setTransform(res_matrix);
|
||||
alignmainmodel->setTransform(res_matrix);
|
||||
|
||||
// Load panels
|
||||
unsigned int i;
|
||||
|
@ -336,7 +336,7 @@ fgLoad3DModel (const string &path)
|
|||
model->addKid(align);
|
||||
}
|
||||
|
||||
return model;
|
||||
return alignmainmodel;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue