Is there something similar to scene.mouse.getclick in the visual module (VPython)?
I need it for a rollover.
Thanks in advance.
EDIT: I need a function for doing something when the mouse moves inside a special area without clicking.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As mentioned by mathmike, it would seem that you could use scene.mouse.pick to get the object that is currently under the mouse, and as for the ‘scene-position’, I think scene.mouse.pickpos is what you’re looking for – if not, you should be able to calculate it from the global mouse position (through getEvent()).
Otherwise, look at getting your information from the getEvent() function, and possibly writing an event loop for yourself.