WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 08-17-2018, 09:28 AM
sskalicky sskalicky is offline
Join Date: Aug 2018
Posts: 2
manually set mouse cursor position


I'm designing an experiment where the user picks an object with the mouse to initiate a trial. I'd like to reset the mouse cursor to the center of the screen before the start of a new trial, but I can't seem to find a way to set the position. Any help?
Reply With Quote
Old 08-18-2018, 08:21 AM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,466
Here's some example code:

import viz
import vizact
import win32api


def setCursorCenter():
vizact.onkeydown(' ',setCursorCenter)
Reply With Quote
Old 08-20-2018, 06:41 AM
sskalicky sskalicky is offline
Join Date: Aug 2018
Posts: 2
Many thanks Jeff!
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mouse bug in V3 and V4 Renato Lima Vizard 2 05-11-2011 06:38 PM
Mouse event: how to detect no mouse move event, how to set mouse position? Zhi Vizard 3 04-11-2011 06:25 PM
Warning mouse() -> Set mouse() of window johannes2 Vizard 1 08-19-2010 02:11 PM
how to remove velocity when mouse is disabled? jvacare1 Vizard 2 02-18-2010 10:25 AM
Navigating an avatar using mouse position(2D) in 3D environment james007 Vizard 1 10-16-2009 11:29 AM

All times are GMT -7. The time now is 02:47 PM.

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