From 66c64459e6be024f36cda3dd6857af92e529ac01 Mon Sep 17 00:00:00 2001 From: frohlich Date: Tue, 24 Mar 2009 09:09:00 +0000 Subject: [PATCH] Makes more sense to process the orientation in this order. Modified Files: simgear/scene/model/placement.cxx --- simgear/scene/model/placement.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/simgear/scene/model/placement.cxx b/simgear/scene/model/placement.cxx index 2a3f0d43..9da016ef 100644 --- a/simgear/scene/model/placement.cxx +++ b/simgear/scene/model/placement.cxx @@ -53,8 +53,11 @@ SGModelPlacement::update() // The orientation, composed from the horizontal local orientation and the // orientation wrt the horizontal local frame SGQuatd orient = SGQuatd::fromLonLat(_position); + orient *= SGQuatd::fromYawPitchRollDeg(_heading_deg, _pitch_deg, _roll_deg); + // Convert to the scenegraph orientation where we just rotate around + // the y axis 180 degrees. orient *= SGQuatd::fromRealImag(0, SGVec3d(0, 1, 0)); - orient *= SGQuatd::fromYawPitchRollDeg(-_heading_deg, _pitch_deg, -_roll_deg); + _transform->setTransform(position, orient); } -- 2.39.5