WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-16-2010, 04:48 AM
kay kay is offline
Member
 
Join Date: Oct 2009
Posts: 10
Change position of MainView after COLLISION_EVENT

hi,

I would like to set the MainView to a new position after there was a COLLISION_EVENT. Calling viz.MainView.setPosition(...) leads to a "RuntimeError: maximum recursion depth exceeded".

Code:
viz.collision(viz.ON)

def onCollision(info):
	viz.MainView.setPosition([0,0,0])

viz.callback(viz.COLLISION_EVENT,onCollision)
Using viz.MainView.reset(viz.HEAD_POS) works. But how do I change the reset position? The default is (0,1.82,0).

Code:
viz.collision(viz.ON)

def onCollision(info):
	viz.MainView.reset(viz.HEAD_POS)

viz.callback(viz.COLLISION_EVENT,onCollision)
Thank you very much for suggestions.
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
Change model alpha and memory leak hosier Vizard 2 06-25-2009 10:55 AM
writing joystick position to a data file Saz Vizard 3 12-17-2008 05:18 AM
How can you dynamically change the gain on a tracker-based CaveView? michaelrepucci Vizard 2 09-23-2008 07:18 AM
Randomly and Continuously Change Avatar's Face Texture Karla Vizard 4 08-22-2008 12:14 PM
Avatar always returns in initial position pattie Vizard 2 08-31-2006 08:15 PM


All times are GMT -7. The time now is 02:44 PM.


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