Login | Register 
Products Applications Downloads Features Wiki forum Store
 

Kinect controlled object as cursor

Still a little green? Ask your beginner's questions here

Kinect controlled object as cursor

Postby michela » Mon Jun 25, 2012 9:54 am

Is there a way to use the inbuilt rollover state with an arbitrary input rather than mouse?

Or way to override mouse position (apart from controlpanel -x <object>)? If there's a way to overide tx and ty then the Kinect controlled icon position can be updated.

Maybe I'm missing something obvious but after implementing a button with all the rollover behavior I want I'm stumpted as to how to link this up to the Kinect powered cursor (I can manually click the button of course but can't sync up Kinect icon rollover with button's rollover state)

Michela
michela
 
Posts: 54
Joined: Tue Jan 10, 2012 10:51 pm
Location: Sydney

Re: Kinect controlled object as cursor

Postby rodberry » Mon Jun 25, 2012 9:23 pm

HI Michela,

I've already asked this in different ways:
viewtopic.php?f=20&t=3114&start=60#p12868
viewtopic.php?f=4&t=3602

from my understanding so far, it's not directly possible (I'll be rapt as an anaconda if Derivative folk chime in with an easy how-to though). There are some things that can make it possible for multitouch devices sending in chop channels but, on touch screens, there is not a concept of moving the mouse without a click or click/drag involved since every touch is seen as a click and hovering is not registered (although some new screens might have this ability soon).

However, Imran put forward some ideas for a workaround but I have not got far with it yet...

"commands useful:
findpanel http://www.derivative.ca/wiki077/index. ... =Findpanel
controlpanel http://www.derivative.ca/wiki077/index. ... ntrolpanel "

" ... my syntax might be wrong as this is just a quick pseudo-code...

=)
Sadly, this hovering feature is not supported, but this does not mean that you are unable to implement this feature via a workaround. Basically, what u need to do is (not sure if this is cpu intensive):

Here is a pseudo-code:

u need to have a cvar called cur_panel;

run per frame to find current panel
store name of current panel to a temp_variable
check if temp_variable==cur_panel
if temp_variable != cur_panel
controlpanel cur_panel rollover 0 (change the old panel rollover to be 0)
cvar cur_panel = temp_variable
controlpanel cur_panel rollover 1 (change the new panel rollover to be 1)
else
exit
endif

"


Sorry Imran for pasting this without checking with you. no warranties expressed or implied etc.etc. etc.

anyone else have an idea how to do this? I have a half-baked idea to try the renderpick with some simple invisible 3D stuff to make some easily configurable buttons but that seems silly when it should be soooo simple to just use the lovely GUI stuff that's already in touch.


rod.
User avatar
rodberry
 
Posts: 905
Joined: Wed Nov 14, 2007 1:51 pm
Location: Hobart, Tasmania, Australia

Re: Kinect controlled object as cursor

Postby greg » Mon Aug 27, 2012 12:26 am

I think the Mouse Out CHOP will help. It drives the real windows cursor.

Create a Constant CHOP with 2 channels tx and ty. Wire it to a Mouse Out CHOP (the cursor will jump once, but you still have control of it).

Then display your panel containing gadgets (panel components) somewhere on your monitor.

Then you need to take your Kinect XY positions and make 1 or 2 "opparm" commands that set the tx and ty value of the Constant CHOP (parameters value0 and value1). When you run the opparm command, the new tx and ty will go to the Mouse Out CHOP, the cursor will move to that full-screen location, and the rollover of a gadget will occur if the cursor is over the gadget (you can check that with a Panel CHOP).

(Or tabcell the tx and ty values in a Table DAT and convert that to a CHOP (via DAT to CHOP) with tx and ty channels.)

The Mouse Out CHOP is a little awkward but it works. Its functionality probably should be duplicated with command that you would call after converting your Kinect data into an XY position for the mouse.
User avatar
greg
Staff
 
Posts: 291
Joined: Tue Nov 13, 2007 12:08 am

Re: Kinect controlled object as cursor

Postby rodberry » Mon Aug 27, 2012 6:53 am

Thanks Greg, we ended up using the mouse-out CHOP for that particular gig but I'm making a tox that uses the hints posted earlier. I'll try to get at least a simple version up this week so others can tweak it and improve it.
rod.
User avatar
rodberry
 
Posts: 905
Joined: Wed Nov 14, 2007 1:51 pm
Location: Hobart, Tasmania, Australia


Return to Beginners

Who is online

Users browsing this forum: No registered users and 1 guest

cron