WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Walking viewpoints (https://forum.worldviz.com/showthread.php?t=1589)

TrashcanPatrol 08-05-2008 11:16 AM

Walking viewpoints
 
I've been looking at this for a bit now, and I saw a demo/something where the viewpoint was inside of a mini cooper. The user would press Up and Down to move forward and backward, and with the mouse they could look around. However, the left and right were bound to the body of the car.
I tinkered with the script a bit and removed the viewpoint from the car, but the farthest I could get to freeing the left and right views was to make the viewpoint rotate left and right when pressed. It doesn't let you move forward/backward AND rotate right/left, though.
I guess my questions are...
-How do I get it so that I can move the viewpoint forward without the mouse, and look around while moving but be unbound to the body?
-Is there any way to walk forward/backwards and strafe left/right with the keyboard, and look around with the mouse (without having to click, and without being bound to the body)?

Apologies for my lack of knowledge, I'm a bit new to this >_<

farshizzo 08-05-2008 06:01 PM

There are many different ways to accomplish this. From your description it seems that the built-in FlyNavigate camera control would do what you want. The code for it is in the vizcam module. Here is a sample script that shows how to use it. Use the arrow keys and mouse to move around.
Code:

import viz
viz.go()

import vizcam
vizcam.FlyNavigate()

viz.add('gallery.ive')

Let me know if this isn't what you are looking for.

TrashcanPatrol 08-06-2008 08:29 AM

Yeah, that was exactly what I was looking for. Thanks!

Also, just wondering, how could I fix the problem with when I move back and forward with the keyboard, but use the left/right keys to rotate (doing what the mouse did when it was on FlyNavigate mode)? My problem is that it doesn't let me press say, up to move forward while pressing right to look right. I'd have to press up, stop pressing up, then press right, rotate how much I want to, then press up again to keep moving.
PS: Is there a way to increase movement/look speed?

farshizzo 08-07-2008 10:06 AM

You will need to create your own camera handler that does what you want. You can use the code for the FlyNavigate camera as a starting point. The FlyNavigate camera also has a sensitivity function that lets you control the move/turn speed.

brunomartelli 05-01-2013 08:41 AM

what is that 'sensitivity' function please? how do you make it go?

Jeff 05-02-2013 09:14 AM

The sensitivity method allows you to scale both the move speed and turn speed:
Code:

flyNav = vizcam.FlyNavigate()
flyNav.sensitivity(6,1)



All times are GMT -7. The time now is 02:49 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC