From 6d974c991e777a4483a8f0aa358ac4646fe29c62 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Mon, 3 Jun 2013 20:07:55 +0300 Subject: [PATCH] mpr model orientation fix --- src/engine/mpr.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/mpr.h b/src/engine/mpr.h index a856732..10abb4e 100644 --- a/src/engine/mpr.h +++ b/src/engine/mpr.h @@ -199,8 +199,8 @@ namespace mpr ModelOBB(const vec &ent, const vec ¢er, const vec &radius, float yaw, float pitch, float roll) : o(ent), radius(radius), orient(vec(0, 0, 1), yaw*RAD) { - if(pitch) orient.mul(quat(vec(1, 0, 0), pitch*RAD), quat(orient)); - if(roll) orient.mul(quat(vec(0, -1, 0), roll*RAD), quat(orient)); + if(pitch) orient.mul(quat(vec(1, 0, 0), pitch*RAD)); + if(roll) orient.mul(quat(vec(0, -1, 0), roll*RAD)); o.add(orient.rotate(center)); } @@ -241,8 +241,8 @@ namespace mpr ModelEllipse(const vec &ent, const vec ¢er, const vec &radius, float yaw, float pitch, float roll) : o(ent), radius(radius), orient(vec(0, 0, 1), yaw*RAD) { - if(pitch) orient.mul(quat(vec(1, 0, 0), pitch*RAD), quat(orient)); - if(roll) orient.mul(quat(vec(0, -1, 0), roll*RAD), quat(orient)); + if(pitch) orient.mul(quat(vec(1, 0, 0), pitch*RAD)); + if(roll) orient.mul(quat(vec(0, -1, 0), roll*RAD)); o.add(orient.rotate(center)); }