[Plugin]FPS Nav

[Plugin]FPS Nav

Postby Alan Chatham » Tue Aug 23, 2011 6:28 pm

First Person Shooter Navigation

*Updated 07 March 2012*

- Fixed bug that prevented movement after entering the top-down perspective
- Added nice options dialog

In addition to arrow keys and WASD, you can now use the Numpad to navigate - 8456 move on the X-Y plane, and 7 and 9 move you down and up. Movement speed and mouse sensitivity (in the Plugins/FPSNav menu) now save across sessions.

So, I'm new to 3d modeling, and rather than just getting used to the zoom controls of SketchUp like a normal person, I decided to make a plug-in that allows you to move through the scene with either the arrow keys or the standard FPS WASD controls, with mouselook when you click. However, I'm also new to plugin authoring, and so I'm looking for some feedback on this plugin. You can download it here: http://www.openchord.org/FPSNav.rbz

It should show up on your toolbar (or if not, you can find it in View->Toolbars->FPSNav). Click on it, and it works the following way:

- Navigate on the X-Y plane using the arrow keys

- Alternately, hold 'Shift' and use WASD to move (if you don't hold shift, you'll just activate other tools. Damn hotkeys)

- Also while holding 'Shift', use Q to lower your height and E to rise upwards

- To rotate the camera, Left-click and hold, then drag the mouse around

- To move at 10 times the normal speed, hold Right-click

I'd love to get some feedback on this tool, or even just tips on better ways to control the movement. Thanks!
0
Last edited by Alan Chatham on Tue Mar 06, 2012 11:55 pm, edited 3 times in total.

Alan Chatham 
PluginStore Author
PluginStore Author
 

Re: [Plugin]FPS Nav

Postby danbig » Wed Aug 24, 2011 6:20 am

Hi Alan -

Welcome to the boards, and thank you for this incredible plugin. I've wanted something like this on multiple occasions, and I think this approach makes more sense than the built in walk through tool.

Here are my thoughts after trying it out:

It looks like, if I've mapped a custom shortcut to WSAD, that over rides this plugin (even if I use shift). There may not be a way around this.

Could you display the eye height in the VCB, and allow the user to specify and eye height?
0

danbig 
 

Re: [Plugin]FPS Nav

Postby Krisidious » Wed Aug 24, 2011 6:52 am

awesome... I can dig this.
0
By: Kristoff Rand
Home Designer
Unique House Plans
User avatar
Krisidious 
 

Re: [Plugin]FPS Nav

Postby Gaieus » Wed Aug 24, 2011 7:24 am

Hi Alan and indeed welcome and thanks for the plugin (although I will probably not use it personally).

What I know however is that you should be able to override custom shortcuts when the plugin is active. ThomThom made his Vertex Edit tool this way for instance so just dive in down in the developers forum and ask around (but do not ask me...).
;)
0
User avatar
Gaieus 
 

Re: [Plugin]FPS Nav

Postby Panga » Wed Aug 24, 2011 1:26 pm

Thanks Alan and welcome here, I'll try right now !!
0

Panga 
Premium Member
Premium Member
 

Re: [Plugin]FPS Nav

Postby Alan Chatham » Wed Aug 24, 2011 8:09 pm

Thanks for the feedback so far! I'm interested to know that there may be a way to override keyboard shortcuts... Unfortunately, Google's API documentation just tends to be kinda anemic (not just for SketchUp either). I'll try and get some of the improvements done this afternoon, and post them here then.

I also found out that the built-in navigation (zoom, pan, rotate) tools make a lot more sense and are a lot more easy to use when you're using a mouse... like I said, I'm super new to this. I do all my work on a laptop and only rarely plug a mouse in, and so 'using a trackpad' is the context in which I'm developing this. Just some trivia~
0

Alan Chatham 
PluginStore Author
PluginStore Author
 

Re: [Plugin]FPS Nav

Postby AppleHaven » Wed Oct 05, 2011 9:18 am

Dude, this is wonderful! I've been looking for this for a while, and couldn't understand why it wasn't made yet. It makes getting a feel for the environment so much better. One million thanks! Next step: collision detection?
0

AppleHaven 
 

Re: [Plugin]FPS Nav

Postby tspco » Mon Oct 24, 2011 12:14 am

Not bad at all, since I am a mouser from way back, it will take some time.
A joystick would be great if SU supported such a thing.
Now a question, is there a way to vary the speed of movement, besides normal and fast?
0
SU make 2017, /Twilight Render Hobby
Windows 10,64 bit,16GB ram, quad core Athlon 3.6 gHz proc. Anything else you want to know, ask me.

tspco 
 

Re: [Plugin]FPS Nav

Postby Jorgensen » Mon Jan 30, 2012 9:48 pm

Hi Alan

Just stubled over your plugin, and what a nice found :-)

I have a few questions:

It is possible to change the 'speedkey' from the right mousebutton to the Shift key like it's normal in games (an some editors)? - right now I often get the context menu when using the plugin.

I can move while just pressing WASD - I don't need to activate 'shift' wich I find nice :-)

Would it be possible to 'activate' your scipt automatic when ever WASD is pressed?

Or could one activate / deactivate with a shortcut?

Thanks
0

Jorgensen 
 

Re: [Plugin]FPS Nav

Postby Alan Chatham » Thu Feb 02, 2012 10:29 am

I finally got some time and energy to do a little more work on this plugin, and have made a few little changes -

-You can now use the numeric keypad to move as well, with 7 and 9 moving up and down
-Movement speed and mouse sensitivity data is stored across sessions

Jorgensen, what platform are you running on? I'll look into alternate keyboard shortcuts to use for moving quickly, but at least on Windows 7, shift is needed to prevent the other tools to be selected when using WASD, which sucks, since it tires out the fingers... If there's something different about your platform, I'd love to make it more feature-rich for systems that support it.
0

Alan Chatham 
PluginStore Author
PluginStore Author
 

Re: [Plugin]FPS Nav

Postby JClements » Thu Feb 02, 2012 7:16 pm

Alan,

So I toggle FPS on. I click on the TopView icon. Next I use one of the arrow keys.

As soon as I do this the axis rotates 180+ degrees and the camera is no longer looking straight down. Is this the proper behavior?
0
John
Illustrator
Beaverton, Oregon
User avatar
JClements 
Premium Member
Premium Member
 

Re: [Plugin]FPS Nav

Postby Jorgensen » Thu Feb 02, 2012 9:35 pm

Hi Alan

I've just started to play around with Lumion witch uses the WASD+shift combination - just like FPS games, and I find it a very easy way to navigate around the model..... but when I go back to Sketchup it takes some time to get use to navigate the Sketchup way - mousewheel mousewheel mousewheel mousewheel mousewheel.... :-(

So what I really would like a WASD navigation in Sketchup - and it Should work without I need to activated it by pressing a menu button first.

That's my dream, but I sure know the limitations of Skethup, and it might not be possible to do at all.

I use Windows 7.

Could shiftloc be of any use? - I find the right click mousebutton quite problematic, because the context menu keeps popping up :-(

Thanks :-)

btw - I can't figure out why it's not implemented in Sketchup as default.
0
sketchup pro 2016 16.1.1449 64 bit | windows 10 pro | i7-3770k @3.5 GHz | 16gb ram | gtx 780 ti / gtx 980 ti | nvidia driver 368.39

Jorgensen 
 

Re: [Plugin]FPS Nav

Postby Michaelv » Sat Feb 04, 2012 8:10 pm

Of course keys are not working on mac. :ecstatic:

I already have the keys implemented (arrows keys only) and changed the up down movement to > and < and option/command.
I also used right double click for speed X10 (which I may reduce)

I am planning to use modifier plus arrows for rotating camera up down left right, but rotating around, not rotating the field of view. Working on it.
0

Michaelv 
 

Re: [Plugin]FPS Nav

Postby Alan Chatham » Sun Feb 05, 2012 2:30 am

Let me know how you go, Michael. I'm possibly making some changes to how the camera code works today (it should be minor, but basically it currently creates a new camera and uses that, which means it screws up if you use it in conjunction with panning and tilting, so I want to change that).

JClements - That is unintended! It's an unforseen consequence of the mouselook code, which currently clamps the horizontal angle within a certain range. I'll try and get that fixed today.
0

Alan Chatham 
PluginStore Author
PluginStore Author
 

Re: [Plugin]FPS Nav

Postby Michaelv » Sun Feb 05, 2012 3:06 am

I'll modify accordingly once you modify the camera stuff.

I'm thinking along these lines:
Arrows: pan left/right/backward/forward
Option/Command pans down/up
Control plus arrows orbits left right, up down
<,> changes field of view in and out (but needs a standard reset)
Right double click toggles high speed motion/slow speed

Also I would not come back to a standard view every time, I'd start with the current camera view, which means the mouse orbit,zoom and pan still work.

PMed the current code
0

Michaelv 
 

Re: [Plugin]FPS Nav

Postby Stevo » Mon Feb 20, 2012 10:32 pm

Alan, hey this looks like something I've wanted for a while; especially after playing with Lumion. I downloaded the file and put it in my Plugin folder and I still cant get it working. What is the rbz extension? Where do I put it? Sadly I seem to be having a senior moment....urghh and I'm 48!
0
OS/Hardware:
Win7 64
Sager NP7280
i7 980x
SLI 460M
12gb

Stevo 
 

Re: [Plugin]FPS Nav

Postby Rich O Brien » Mon Feb 20, 2012 10:36 pm

.rbz is installed under Windows > Preferences > Extensions under SU v8 M2

Or just rename the .rbz extension to .zip and unzip it.
0
There's a frontroom and a backroom....reverse faces
User avatar
Rich O Brien 
Administrator
 

Re: [Plugin]FPS Nav

Postby Stevo » Tue Feb 21, 2012 3:41 pm

Thank you Rich. Alls good, this is a great little Plugin Alan, thank you.
0
OS/Hardware:
Win7 64
Sager NP7280
i7 980x
SLI 460M
12gb

Stevo 
 

Re: [Plugin]FPS Nav

Postby Alan Chatham » Tue Mar 06, 2012 11:58 pm

Thanks! I'm glad you like it!
0

Alan Chatham 
PluginStore Author
PluginStore Author
 

Re: [Plugin]FPS Nav

Postby DANSTAZ » Thu May 24, 2012 6:00 pm

Hi this is my first post, and i would like to know if you have the time to answer, does this work like a game in terms of say COD where by the camera pans via the mouse (i noticed you said you didn't use a mouse generaly) and the movement is via the wasd keys? THanks for you time and a massive thanks to all the ruby coders.
0

DANSTAZ 
 

Re: [Plugin]FPS Nav

Postby weba » Sun Jun 03, 2012 1:21 am

Finally found plugin to allow this, should be like this from the start with, developers never played FPS games?


But, what I'd really appreciate, would be invert-mouse for free look! I'm one of those weirdos who likes that, maybe in the next release...? :bounce:
0

weba 
 

Re: [Plugin]FPS Nav

Postby JuanV.Soler » Thu Sep 27, 2012 5:42 pm

could it be possible to move an object with the keypad like in Layout ?
Thanks for the plugin ,._)))

Edited : I found this plugin from Jim : viewtopic.php?t=1530
smart ¡ thank_you
0
_,_)))_,_

JuanV.Soler 
 

Re: [Plugin]FPS Nav

Postby bigjonyz » Tue Feb 05, 2013 11:19 am

Very good effort. if there is a way to reverse the mouse Y axis or sensitivity would be great.
0

bigjonyz 
 

Re: [Plugin]FPS Nav

Postby lonherz » Mon Oct 14, 2013 2:13 pm

@ weba and bigjonyz :

I prefer the y-axis inverted too, and I have obtained this modifying the plugin's code:

- if you have sketchup opened, close it

- open the sketchup's "Plugins" folder

- open the file "FPSNav.rb" in the folder "FPSNav" with a text editor (like notepad++)

- find this line (about at row 343):
Code: Select all
yRotationTransformation = Geom::Transformation.rotation(@FPSNav_eye, horizontalAxis, radiansToRotate)


and change it like this:
Code: Select all
yRotationTransformation = Geom::Transformation.rotation(@FPSNav_eye, horizontalAxis, -radiansToRotate)

(the only difference is a minus before "radiansToRotate")

- save the file and then open sketchup: now the y-axis should be inverted
0

lonherz 
 

Re: [Plugin]FPS Nav

Postby Jorgensen » Sun Jun 22, 2014 9:29 pm

Can anyone please explain how (if possible) I can mod the script so
- I can change the navigation to WASD / Q&E without having to use shift?
- use SPACEBAR to doubble speed?
- automatic start WASD navigation just by pressing 'w'?

Thanks :-)
0
sketchup pro 2016 16.1.1449 64 bit | windows 10 pro | i7-3770k @3.5 GHz | 16gb ram | gtx 780 ti / gtx 980 ti | nvidia driver 368.39

Jorgensen 
 

Re: [Plugin]FPS Nav

Postby Jorgensen » Fri Jun 27, 2014 4:09 pm

bumb :-)
0
sketchup pro 2016 16.1.1449 64 bit | windows 10 pro | i7-3770k @3.5 GHz | 16gb ram | gtx 780 ti / gtx 980 ti | nvidia driver 368.39

Jorgensen 
 

Re: [Plugin]FPS Nav

Postby Jorgensen » Tue Aug 19, 2014 9:24 pm

Or just change the keys to wasd?
0
sketchup pro 2016 16.1.1449 64 bit | windows 10 pro | i7-3770k @3.5 GHz | 16gb ram | gtx 780 ti / gtx 980 ti | nvidia driver 368.39

Jorgensen 
 

Re: [Plugin]FPS Nav

Postby ArielC » Fri Oct 17, 2014 6:00 pm

Been waiting this from AtLast, and then Google, and now Trimble...it's been years I wanted to find other options then I discovered Adobe Director.

It can import Sketchup files and make it interactive including FPS. Files can be published as a standalone executable file for PC or MAC use (haven't tried publishing as an APP for Ipad use but I know it can be done.) For viewing on the Browser, it requires Adobe Shockwave Player plug-in to run.

FPS
-navigating using arrow keys
-with collision
-open swing and sliding doors
-add sound
-many more

Here's a video on a project I was navigating - http://www.youtube.com/watch?v=t-6HQ8erShM

And more on my blog if you want to try - http://sketchuptodirector.blogspot.sg/
0

ArielC 
 

Re: [Plugin]FPS Nav

Postby leeyangyang » Tue Jun 16, 2015 2:31 am

Hi Alan

The link seems down?
0

leeyangyang 
 

Re: [Plugin]FPS Nav

Postby kurogriotcabron » Sun Jan 10, 2016 8:44 pm

Alan...is there any way to reverse the upward/downward looking of the mouse control?

It is backwards from Unity and others
0

kurogriotcabron 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: torrescravo and 15 guests

Visit our sponsors: