View Single Post
  #2  
Old 06-26-2009, 07:08 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
Assuming you are doing collision detection with the "collision(viz.ON)" function, you could wait for a viz.COLLISION_EVENT notification.
Code:
def onCollision(info):
    print 'Collided with object',info.object
    #stop view until joystick impulse direction vector points over 90 degrees 
    #away from info.normal

viz.callback(viz.COLLISION_EVENT, onCollision)
You know your needs better of course, but why not just let the user zero the joystick if they don't like moving around the circle? Perhaps you want is to create a "dead zone" for the joystick input. So if input is less than .05 away from zero, then impulse is 0.
__________________
Paul Elliott
WorldViz LLC
Reply With Quote