Thread: view problem
View Single Post
  #1  
Old 03-10-2009, 08:51 PM
nlfrnassimi nlfrnassimi is offline
Member
 
Join Date: Feb 2009
Posts: 37
view problem

I have imported an avatar and applied a keyboard key to animate it. my problem is that I want to make my view as first person point of view. I've also been able to connect my view to the avatar but the problem is I can see the avatar's head, I want my camera to be beside him moving with him.
Please help.

This is my code:

import viz

viz.go()

viz.add('tut_ground.wrl')

character = viz.add('vcc_male.cfg') # Add a CAL3D based avatar
character.state(1) # Activate the walking state

def characterWalk (key):
if key == viz.KEY_KP_RIGHT:
character.state(2)
walk = vizact.walkTo([5,0,0],1)
character.addAction(walk)


viz.callback(viz.KEYBOARD_EVENT, characterWalk)


viewLink = viz.link( character, viz.MainView, enabled = True )
viewLink.setDstFlag(viz.LINK_HEAD)
Reply With Quote