WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   assigning the mouse functionality to Keyboard events (https://forum.worldviz.com/showthread.php?t=3003)

jaffaaswami 10-06-2010 06:49 AM

assigning the mouse functionality to Keyboard events
 
Hi all,

I am beginner to game development and 3D environment. Recently I have gone through some tutorials(world demos) in viz and found the "duck court" demo interesting. I want to make a change to the existing code. Instead of using a mouse to target the ducks, I want the keyboard arrow keys to take care of that..

The code for the mouse looks like this:

#Add a crosshair that is linked to the mouse
viz.link(viz.Mouse , viz.addTexQuad(viz.SCREEN,texture=viz.add('crossha ir.png')) )

How should I assign the same to keyboard arrow keys. So that the crosshair moves all around the screen. Thanks in advance. You all have a great day ahead.

Thank & Regards,
Swami


All times are GMT -7. The time now is 10:15 AM.

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