WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   First-person-shooter type control? (https://forum.worldviz.com/showthread.php?t=2746)

shahramy 05-22-2010 02:17 AM

First-person-shooter type control?
 
hi every body
how can I First-person-shooter type control?
changing orientation of an avatar with mouse(left or right turning) and move forward or backward with keyboard.

Jeff 05-24-2010 11:54 AM

You can change the camera handler and link the avatar to the viewpoint:
Code:

import viz
viz.go()

ground = viz.add('tut_ground.wrl')

avatar = viz.add('vcc_male.cfg')
avatar.state(2)

link = viz.link(viz.MainView,avatar)
link.preTrans([0,-1.8,2])

import vizcam
viz.cam.setHandler(vizcam.FlyNavigate())



All times are GMT -7. The time now is 05:12 PM.

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