minor tweaks for new scene graph stuff

This commit is contained in:
David Rose 2003-06-27 22:55:29 +00:00
parent f255fd3291
commit 8d70eeb6ab

View File

@ -92,18 +92,13 @@ transform_changed() {
// get the transform
CPT(TransformState) transform = get_transform();
// extract the position
LPoint3f pos;
transform->get_mat().get_row3(pos,3);
// extract the orientation
if (_mass_center->get_oriented() == true) {
LOrientationf orientation(transform->get_mat());
_mass_center->set_orientation(orientation);
_mass_center->set_orientation(transform->get_quat());
}
// apply
_mass_center->set_position(pos);
_mass_center->set_position(transform->get_pos());
}
////////////////////////////////////////////////////////////////////