Meant to be Seen
https://www.mtbs3d.com/phpbb/

Can use mouse & glovePIE DIY a VR Treadmill / omni / ?
https://www.mtbs3d.com/phpbb/viewtopic.php?f=140&t=22067
Page 1 of 1

Author:  vrxiaochouyu [ Wed Aug 03, 2016 7:23 am ]
Post subject:  Can use mouse & glovePIE DIY a VR Treadmill / omni / ?

i want use two mouses to make VR Treadmill. Place the mouse on the sole of the foot.
and then use glovePIE . such as use the glovePIE change the move backware of mouse to keyboard W.
but the mouse always output Mouse signal and keyboard signal at the same time!what should i do?

Author:  vrxiaochouyu [ Thu Aug 04, 2016 9:20 am ]
Post subject:  Re: Can use mouse & glovePIE DIY a VR Treadmill / omni / ?

i write a mouse to move scripts. but it not working correctly . who can tell me what's wrong with the scripts?






// use 3 mouses to contrl move. mouse1 be used for mouse .
//mouse2 be used for left foot.mouse3 be used for right foot
//when mouse2 or mouse3 turn to down slowly ,output W. output shift+W when fast.


//Cancel the impact of the mouse2&3 to cursor
if starting then
cursor2.visible = false
cursor3.visible = false
endif

key.2 = mouse2.LeftButton //test mouse number
key.3 = mouse3.LeftButton //test mouse number

//mouse2
var.deltax2 = Delta(mouse2.DirectInputX)
var.deltay2 = Delta(mouse2.DirectInputY)


if |var.deltax2| <= 0.5 then
if var.deltax2 > 0 then key.S = mouse2.DirectInputX
endif
if var.deltax2 < 0 then key.W = mouse2.DirectInputX
endif
endif
if |var.deltax2| > 0.5 then
if var.deltax2 > 0 then key.S + Lshift = mouse2.DirectInputX
endif
if var.deltax2 < 0 then key.W + Lshift = mouse2.DirectInputX
endif
if |var.deltay2| <= 0.5 then
if var.deltay2 > 0 then key.A = mouse2.DirectInputY
endif
if var.deltay2 < 0 then key.D = mouse2.DirectInputY
endif
endif
if |var.deltay2| > 0.5 then
if var.deltay2 > 0 then key.A + Lshift = mouse2.DirectInputY
endif
if var.deltay2 < 0 then key.D + Lshift = mouse2.DirectInputY
endif




//mouse3
var.deltax3 = Delta(mouse3.DirectInputX)
var.deltay3 = Delta(mouse3.DirectInputY)


if |var.deltax3| <= 0.5 then
if var.deltax3 > 0 then key.S = mouse3.DirectInputX
endif
if var.deltax3 < 0 then key.W = mouse3.DirectInputX
endif
endif
if |var.deltax3| > 0.5 then
if var.deltax3 > 0 then key.S + Lshift = mouse3.DirectInputX
endif
if var.deltax3 < 0 then key.W + Lshift = mouse3.DirectInputX
endif
if |var.deltay3| <= 0.5 then
if var.deltay3 > 0 then key.A = mouse3.DirectInputY
endif
if var.deltay3 < 0 then key.D = mouse3.DirectInputY
endif
endif
if |var.deltay3| > 0.5 then
if var.deltay3 > 0 then key.A + Lshift = mouse3.DirectInputY
endif
if var.deltay3 < 0 then key.D + Lshift = mouse3.DirectInputY
endif

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/