Forums > Jitter

rotatexyz msg doesn't update mouse control in handle

July 28, 2006 | 4:26 pm

Hi cycling,

Where the rotate message in handle also updates the mouse control rotation, rotatexyz doesn’t. The patch below illustrates this. Is this to prevent users from running into gimbal lock?

We solved the problem by stupidly feeding the handle’s rotate arguments back into the handle as you can see in the example. Could this lead to gimbal lock somehow?

#P toggle 165 104 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 193 105 257 196617 3) open gate and repeat steps 2 and 3 , works fine now;
#P newex 165 122 29 196617 gate;
#P newex 261 144 18 196617 t l;
#P newex 184 79 65 196617 t getrotate l;
#P flonum 184 45 35 9 0 0 0 3 0 0 0 204 156 97 222 222 222 0 0 0;
#P message 184 62 100 196617 rotatexyz $1 $1 $1;
#P newex 24 83 50 196617 t b erase;
#P newex 165 144 94 196617 jit.gl.handle dinges;
#P toggle 24 45 15 0;
#P newex 24 64 52 196617 metro 40;
#P newex 24 133 89 196617 jit.window dinges;
#P newex 165 165 255 196617 jit.gl.gridshape dinges @shape cube @position 0. 0. -3.;
#P newex 24 103 96 196617 jit.gl.render dinges;
#P comment 41 45 18 196617 0);
#P comment 220 45 100 196617 1) change rotatexyz;
#P comment 333 45 197 196617 2) rotate with mouse: objects jumps back;
#P connect 8 1 13 0;
#P connect 12 0 14 1;
#P connect 10 0 12 0;
#P connect 11 0 10 0;
#P connect 8 0 4 0;
#P fasten 12 1 8 0 244 141 170 141;
#P connect 13 0 8 0;
#P connect 14 0 8 0;
#P connect 16 0 14 0;
#P connect 9 1 3 0;
#P connect 9 0 3 0;
#P connect 6 0 9 0;
#P connect 7 0 6 0;
#P window clipboard copycount 17;

Regards,
Mattijs


Viewing 1 post (of 1 total)