WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   mouse pointer (https://forum.worldviz.com/showthread.php?t=2913)

shahramy 08-26-2010 01:19 AM

mouse pointer
 
hi
I changed mouse pointer as duckcourt example. I need to use viz.pick but I can not. is there way to solve this problem?
thank you all

Jeff 08-31-2010 12:52 PM

Can you post some example code that's shows your problem?

shahramy 09-04-2010 02:27 AM

I meant I want to change cursor shape. if I link a object to mouse pointer, when I use viz.pick, that object has been returned.

Jeff 09-07-2010 02:22 PM

The following code links an object to the mouse position and correctly returns the picked object.
Code:

import viz
viz.go()
       
viz.link( viz.Mouse , viz.addTexQuad(viz.SCREEN,texture=viz.add('crosshair.png')) )
viz.mouse(viz.OFF)
viz.mouse.setVisible(viz.OFF)

court = viz.add('court.ive')       

male = viz.add('vcc_male.cfg',pos=[-1,0,5],euler=[180,0,0])
male.state(1)

female = viz.add('vcc_female.cfg',pos=[1,0,5],euler=[180,0,0])
female.state(1)

def getPicked():
        object = viz.pick()
        if object == male:
                print 'male'
        elif object == female:
                print 'female'
        elif object == court:
                print 'court'
               
vizact.onmousedown(viz.MOUSEBUTTON_LEFT,getPicked)



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

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