WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 02-10-2009, 11:25 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
self.__moveScale and self.__turnScale are private to the FlyNavigate class and when you try to set those in your MyFlyNavigation class your are creating new instances of them and so the viewpoint is not affected.

When you call the sensitivity method it works
Code:
vizcam.FlyNavigate.sensitivity(self, 1.0, turnScale)
but by passing in a 1 you are re-setting the moveScale valueback to its original value

keep track of both moveScale and turnScale in your class and then pass them both to FlyNavigate.sensitivity
Code:
def __init__(self):
	# Default movement keys
	vizcam.FlyNavigate.__init__(self,'w','s','a','d')
	self.__moveScale = 1
	self.__turnScale = 1
and then you can set each value individually and pass in the value set before
Code:
def setMoveSensitivity(self, moveScale):
	self.__moveScale = moveScale
	vizcam.FlyNavigate.sensitivity(self, self.__moveScale, self.__turnScale)
	
def setLookSensitivity(self, turnScale):
	self.__turnScale = turnScale
	vizcam.FlyNavigate.sensitivity(self, self.__moveScale, self.__turnScale)
Reply With Quote
 

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:50 AM.


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