-
3dconnexion expedient
I have tryed to create a Zscript for my 3dconnexion device:
[CODE]
[vardef,xstep,1]
[vardef,ystep,1]
[vardef,zstep,1]
//sensibility slider
[Islider,"x",xstep,1,0,10,,,,80]
//+XXXXXXXXXX
[Ibutton,"+X",,
[VarSet,xstep, [IGet,zscript:x]]
[Ipress,Transformraw Pointer]
[CanvasClick, 0, 0, xstep, 0]
]
//-XXXXXXXXXX
[Ibutton,"-X",,
[VarSet,xstep, [IGet,zscript:x]]
[Ipress,Transformraw Pointer]
[CanvasClick, 0, 0, -xstep, 0]
]
[/CODE]
this create 2 button to turn the object on Y axes
then i create a little script for Glovepie that press key 9 o 3 when i rotate my 3dconnesxion device:
[CODE]
var.roll_on= Joystick1.roll - var.roll
var.x=var.roll_on != 0
if var.x then {
if var.roll_on >0 then {
Key.NUMPAD9=1
Key.NUMPAD9=0
}else{
Key.NUMPAD3=1
Key.NUMPAD3=0
}
}
var.roll = Joystick1.roll
[/CODE]
So if you assoce the hotkey 9 and 3 you can rotate the object with 3d device
next step is to add the other axes
there is 1 problem:
some time the hotkeys don't work and i don't' know why ...
PS:sorry for my english
i'm not a good scripter so if someone want to continue this script ...
Last edited by hood; 01-16-08 at 04:51 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules