WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   move arm. (https://forum.worldviz.com/showthread.php?t=3107)

psykoko 12-01-2010 06:23 PM

move arm.
 
Hi i want to move that female_arm smoothly.
if minus sigal input from UDP, i want to move forearm from 0 to -90 degee.
so i have been coding this.
please modify my code.

Code:

def update():
        global n1,n2
        n1 -= 1
        n2 += 1
        data = ReceiveData()
        if data:
                        udp = struct.unpack(">d", data[0])[0]
                        print udp
                        if  0 > udp :
                                Euler = Forearm.getEuler(viz.AVATAR_WORLD)
                                Forearm.setEuler([0,0,n1])
                                #Forearm.setEuler([0,viz.elapsed(),-1],viz.REL_LOCAL)
                                UpperArm.setEuler(0, -30, -80)



All times are GMT -7. The time now is 11:21 AM.

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