WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-23-2008, 09:45 AM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
Quick Question

Calling all Vizards,

I am trying to add the ability to mount and dismount a vehicle (FLT) in my scene. When dismounted the user should be able to walk around the environment as normal. Problem is when I only seem to able to perform this action once, maybe I am trying to do this the wrong way . Here is a snippet of code to illustrate the way I am trying to achieve this.

Code:
import vizcam

def orbitCamera():
	cam = vizcam.PivotNavigate(distance=4)
	cam.centerNode(run)
	bodyLink.remove()
	
def normalView():
	bodyLink = viz.link(body,view,dstFlag=viz.LINK_BODY)
	bodyLink.preTrans([0,-0.29,0.2])

def buttonTimer():
	if joy.isButtonDown (3):
		vizact.choice([orbitCamera(),normalView()],vizact.LOOP)
vizact.ontimer(viz.FASTEST_EXPIRATION,buttonTimer)
Do I need to use groups? If so, how?

Thanks for any help in advance,

Regards,

Nige
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 04:43 AM.


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