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:-
Code:
#getting the handle of avatar from vizconnect
avatar = vizconnect.getAvatar('male_2').getRaw()
avatar.state(1)
#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'
avatar.state(2)
elif key == "r":
print 'R key pressed'
viz.callback(viz.KEYDOWN_EVENT,onKeyDOWN)
#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'
viz.callback(viz.KEYUP_EVENT,onKeyUp)
How can i play animation nicely for the character male_2 which i got above from vizconnect.
Pls assist me further.
Thank You!!