View Single Post
Old 07-28-2017, 01:44 AM
rajnishv rajnishv is offline
Join Date: Jan 2016
Location: Kalina,Sanatcruz(East),Mumbai,Maharashtra,India
Posts: 94

Yes i did the same thing as u have replied,but was missing due to some offsets values for group tracker and now it works like a charm.

Now i want to apply a walking and idle animation on some key events,
i tried some logic,but the character male_2 does not walk on some animation instead it shakes with random left right.

My Code which does not play walk and idle animation for the avatar male_2 which i got from vizconnect nicely and properly as same as animation seen in inspector on key events:-

#getting the handle of avatar from vizconnect 

avatar = vizconnect.getAvatar('male_2').getRaw()

#Playing walk animation on some key events

def onKeyDOWN(key): 
    if key == 'w' or key == 's' or key == 'a' or key == 'd' or key == 'q' or key == 'e': 
        print 'w  and s key pressed' 
    elif key == "r": 
        print 'R key pressed' 


#Playing idle animation on some key events

def onKeyUp(key): 
    if key == 'w' or key == 's' or key == 'a' or key == 'd' or key == 'q' or key == 'e': 
        print 'w  and s key released' 
        avatar.state(1) #looping idle animation
    elif key == "r": 
        print 'R key released' 


How can i play animation nicely for the character male_2 which i got above from vizconnect.

Pls assist me further.

Thank You!!

Last edited by rajnishv; 07-28-2017 at 01:49 AM.
Reply With Quote