Lost Adventurer, Aleks Kirilenko (3D)
LC #42 Pipers Alley

View Full Version : Artist looking for help

02-24-2005, 01:44 AM
Hi I'm not a coder in any (well, except for things like html and php..) way but I'm trying to find a way to get a proper viewport rotation in blender 3d.. If it's too much work just tell me I don't really care but if there is a way to fix the problem please help me.

The current problem is that when you rotate the Z axis doesn't stay up and straight, it rotates so it ends up in strange viewport rotation.

Thanks for the help if you can do anything about it. If you're missing some info tell me.

else {
/* is there an acceptable solution? (180 degrees limitor) */
if(si<1.0) {
Crossf(q1+1, firstvec, newvec);


phi= asin(si);

si= sin(phi);
q1[0]= cos(phi);
q1[1]*= si;
q1[2]*= si;
q1[3]*= si;

QuatMul(G.vd->viewquat, q1, oldquat);

/* rotate around z-axis (mouse x moves) */

phi= 2*(mval[0]-mvalball[0]);
phi/= (float)curarea->winx;
si= sin(phi);
q1[0]= cos(phi);
q1[1]= q1[2]= 0.0;
q1[3]= si;

QuatMul(G.vd->viewquat, G.vd->viewquat, q1);

CGTalk Moderation
02-24-2006, 02:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.