Do you know how to send a value for 'pool' to the onActionEnd function?
Do you know how to send a value for 'pool' to the onActionEnd function?
We are trying to use the function in this function: if (ag1=='a1' and ag2=='a3'): walk_over = male.walkto(meetingpoint[0]+1,meetingpoint[1],meetingpoint[2]) #This line calls that animation. male.act(walk_over) walk_over2 = male1.walkto(meetingpoint[0],meetingpoint[1],meetingpoint[2]) male1.act(walk_over2) viz.callback(viz.ACTION_END_EVENT,onActionEnd) And the onActionEnd function currently looks like this: def onActionEnd(obj,action,pool): if obj == male and action == walk and pool == malemale1: pos=male.get(viz.POSITION) pos2=male1.get(viz.POSITION) rotate_degrees = vizmat.AngleToPoint(pos[0],pos[2],pos2[0],pos2[2]) male.rotate(0,1,0,rotate_degrees) male.act(5) |
Have a look in the documentation under "Creating Virtual Worlds -> Actions". It should explain how action pools work.
|
All times are GMT -7. The time now is 04:08 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC