#1
|
|||
|
|||
Bouncing point of view during walking
Dear all,
I am working on a project in which the point of view of a walking person will be simulated. So I need to add fluctuation of natural walking to the main view when the subject is moving. I was thinking about linking the main view to an moving avatar with his body bouncing during walking. Would that be possible? Or is there a better way to achieve this? I am quite new to Vizard. Any help and suggestion would be highly appreciated. Many thanks! |
#2
|
|||
|
|||
Yes, you can link the viewpoint to the head bone of the walking avatar:
Code:
''' Toggle avatar with spacebar ''' import viz import vizact import vizinfo viz.go() vizinfo.InfoPanel() ground = viz.addChild('ground.osgb') avatar = viz.addAvatar('vcc_male2.cfg',pos=[0,0,2],euler=[180,0,0]) avatar.runAction(vizact.walkTo([0,0,15])) head = avatar.getBone('Bip01 Head') link = viz.link(head,viz.MainView) link.preTrans([0,0.2,-0.7]) #Set viewpoint pitch to 0 link.setEuler([None,0,None]) vizact.onkeydown(' ',avatar.visible,viz.TOGGLE) Code:
link.setEuler([None,0,None]) |
#3
|
|||
|
|||
It works. Thank you very much!
|
Tags |
walking |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
View point question | atamasan | Vizard | 7 | 01-26-2010 04:56 PM |
avatar automatically runs animation after fading into view | v-clizzin | Vizard | 1 | 10-14-2009 05:01 PM |
View | nlfrnassimi | Vizard | 0 | 03-17-2009 02:01 AM |
View | nlfrnassimi | Vizard | 4 | 03-12-2009 05:25 AM |
problem with stereo mode | shivanangel | Vizard | 3 | 10-17-2006 09:58 AM |