Viewport navigability suggestion

Next
 From:  wastzzz
6145.1 
Some 3D software have an option for navigability which in my opinion is very good for understanding the project, and working on details.
Basically it's a button that allows the camera to move with the arrow keys, or WASD keys, like in a videogame.
Would it take a lot to implement this? It would make MoI a perfect software for modeling architectural projects.
Thank you.
M.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
6145.2 In reply to 6145.1 
Hi Max, you can set this up in your current version if you want.

If you want something that works like videogame movement, go to Options > View > Rotate/Pan/Zoom options, and at the top set Rotation style = "First person". With that set, now mouse movements will look left/right/up/down in video game like fashion rotating around the camera point instead of pivoting around a point of interest as they normally do.

Then to make the arrow keys work go to Options > Shortcut keys and set these keyboard shortcuts up:

KeyCommand
LeftArrowscript: moi.ui.mainWindow.viewpanel.getViewport('3D').rotate( 'right', 3.0 );
RightArrowscript: moi.ui.mainWindow.viewpanel.getViewport('3D').rotate( 'left', 3.0 );
UpArrowscript: moi.ui.mainWindow.viewpanel.getViewport('3D').rotate( 'down', 3.0 );
DownArrow    script: moi.ui.mainWindow.viewpanel.getViewport('3D').rotate( 'up', 3.0 );


- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  wastzzz
6145.3 In reply to 6145.2 
Thank you for your reply Michael.
While the "First Person" rotate mode works well, the scripts you wrote me they work but don't exacly do what I want. Maybe you can help me fix those?
I would like the Down and Up arrow keys to move forward and backwards, and the Left and Right arrow keys to strafe left and right.
Thanks
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
6145.4 In reply to 6145.3 
Hi Max,

> I would like the Down and Up arrow keys to move forward and backwards,
> and the Left and Right arrow keys to strafe left and right.

Try these:

KeyCommand
LeftArrowscript: moi.ui.mainWindow.viewpanel.getViewport('3D').pan( -0.2, 0.0, 0.0 );
RightArrowscript: moi.ui.mainWindow.viewpanel.getViewport('3D').pan( 0.2, 0.0, 0.0 );
UpArrowscript: moi.ui.mainWindow.viewpanel.getViewport('3D').pan( 0.0, 0.0, -0.5 );
DownArrow    script: moi.ui.mainWindow.viewpanel.getViewport('3D').pan( 0.0, 0.0, 0.5 );


- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  wastzzz
6145.5 In reply to 6145.4 
thank you!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  3image
6145.6 
Hi Michael,

That is very very useful. Thank you.

Though, is it possible to make the movement in the 3d screen work in screen space orientation?

Moreover, are there keyboard commands for the 2d screens as well?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
6145.7 In reply to 6145.6 
Hi 3image,

> Though, is it possible to make the movement in the 3d screen work in screen space orientation?

Do you mean for rotation? You can make rotation work relative to the view orientation by setting the option under Options > View > Rotate/Pan/Zoom options > "Rotation style" dropdown (at the top). Set Rotation style = "Free rotation" to use a view-relative rotation style, where left/right/up/down means left/right/up/down in viewing screen directions.


> Moreover, are there keyboard commands for the 2d screens as well?

For panning, you can make keyboard shortcuts that work on the active view (the view the mouse is over in split mode or the zoomed viewport in single view mode) by using the following:

KeyCommand
LeftArrowscript: moi.ui.getActiveViewport().pan( -0.2, 0.0, 0.0 );
RightArrowscript: moi.ui.getActiveViewport().pan( 0.2, 0.0, 0.0 );
UpArrowscript: moi.ui.getActiveViewport().pan( 0.0, 0.2, 0.0 );
DownArrow    script: moi.ui.getActiveViewport().pan( 0.0, -0.2, 0.0 );


- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  3image
6145.8 In reply to 6145.7 
Excellent!

Thank you again, Michael.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All