WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 04-23-2008, 05:23 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Are you trying to toggle between the orbit camera and normal view when joystick button 3 is pressed? If so, you will need to modify your code to look something like this:
Code:
import vizcam

cam = vizcam.PivotNavigate(distance=4)
cam.enabled = False

bodyLink = viz.link(body,view,dstFlag=viz.LINK_BODY)
bodyLink.preTrans([0,-0.29,0.2])

def joydown(e):
	if e.button == 3:
		cam.enabled = not cam.enabled
		if cam.enabled:
			bodyLink.disable()
			cam.centerNode(run)
		else:
			bodyLink.enable()

viz.callback(vizjoy.BUTTONDOWN_EVENT,joydown)
This code should properly toggle between the camera and body link. Let me know if anything is not clear.
Reply With Quote
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
General question and question regarding arrays dan12345 Vizard 1 01-15-2008 10:15 AM
Stereo Overlap question JMOwens Vizard 2 01-08-2008 08:54 AM
viztask question asimbh Vizard 1 11-20-2007 09:12 AM
Another color question mjabon Vizard 4 07-31-2007 03:04 PM
Basic Joystick Navigation Question Plasma Vizard 2 01-29-2004 07:08 PM


All times are GMT -7. The time now is 10:51 PM.


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