MoI discussion forum
MoI discussion forum

Full Version: Rotate objects 90º relative to view

Show messages: All  1-13  14-16

From: Marc (TELLIER)
12 Jan   [#14] In reply to [#13]
Thanks !

Marc
From: Mik (MIKULAS)
15 Jan   [#15] In reply to [#7]
Hello Michael,

I've noticed that if I set arrow key Up with command Rotate90RelativeToView Up, so the model turn Down and vice versa, if I set arrow key Down with command Rotate90RelativeToView Down, so the model turn Up,

therefore I changed the order of code from:

case 'left': view_dir = frame.yaxis; view_dir.scale( -1.0 ); break;
case 'right': view_dir = frame.yaxis; break;
case 'up': view_dir = frame.xaxis; break;
case 'down': view_dir = frame.xaxis; view_dir.scale( -1.0 ); break;

to

case 'left': view_dir = frame.yaxis; view_dir.scale( -1.0 ); break;
case 'right': view_dir = frame.yaxis; break;
case 'up': view_dir = frame.xaxis; view_dir.scale( -1.0 ); break;
case 'down': view_dir = frame.xaxis; break;

now the model rotation correspond to arrow key dirrection.

Is that right?

Thanks

Mik
From: Michael Gibson
15 Jan   [#16] In reply to [#15]
Hi Mik, yes you're correct, thanks for the bug fix. I have updated the script above.

- Michael

Show messages: All  1-13  14-16