Fixed CTRL modifier for rotation widget drawing.

Also fixes bug #2481
This commit is contained in:
Ton Roosendaal
2005-04-27 08:52:11 +00:00
parent b16d6e005d
commit 5bae7bb9be

View File

@@ -602,15 +602,15 @@ static void draw_manipulator_rotate_ghost(float mat[][4], int drawflags)
glPushMatrix();
size= screen_aligned(mat);
vec[0]= (float)(Trans.imval[0] - Trans.center2d[0]);
vec[1]= (float)(Trans.imval[1] - Trans.center2d[1]);
vec[0]= (float)(Trans.con.imval[0] - Trans.center2d[0]);
vec[1]= (float)(Trans.con.imval[1] - Trans.center2d[1]);
vec[2]= 0.0f;
Normalise(vec);
startphi= saacos( vec[1] );
if(vec[0]<0.0) startphi= -startphi;
phi= (float)fmod(-180.0*Trans.val/M_PI, 360.0);
phi= (float)fmod(180.0*Trans.val/M_PI, 360.0);
if(phi > 180.0) phi-= 360.0;
else if(phi<-180.0) phi+= 360.0;