WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 11-03-2011, 05:35 PM
Reca Reca is offline
Join Date: Oct 2011
Posts: 1
Vizact onupdate events that wont be disabled


So my problem is that once i have registered 2 separate onupdate events i cant disable them or remove them.

this is where how i create them:

self.update = vizact.onupdate(viz.PRIORITY_PHYSICS-1, self.UpdateJoystick,viz.getFrameElapsed())
self.postupdate = vizact.onupdate(viz.PRIORITY_PHYSICS+1, self.PostPhysics)

then for disabling and re-enabling them.
def Pause(self):
#vizact.removeEvent( self.update )
#vizact.removeEvent( self.postupdate )

def Resume(self):
#self.update = vizact.onupdate(viz.PRIORITY_PHYSICS-1, self.UpdateJoystick,viz.getFrameElapsed())
#self.postupdate = vizact.onupdate(viz.PRIORITY_PHYSICS+1, self.PostPhysics)

i have tried to remove them, then re adding them, i have tried to use vizact.removeevent, but that didn't work either, but in the resume function when i recreated them it would double them up, as they werent being removed

the pause and resume functions are called by a joypad button press

thanks in for any help you can provide
Reply With Quote
Old 11-16-2011, 05:25 PM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,466
You can use <EventFunction>.setEnabled to enable/disable the callback:
event_handle = vizact.onkeydown(' ',myFunction)
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with server Events vOliver Vizard 2 09-15-2010 02:21 PM
how to remove velocity when mouse is disabled? jvacare1 Vizard 2 02-18-2010 10:25 AM

All times are GMT -7. The time now is 01:47 PM.

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