PDA

View Full Version : Object Actions


rmcconnell11
03-31-2014, 02:21 PM
Hi Guys,

I have set up a number of objects to move in certains ways when selected by the mouse, however I need this to know work with a hand model.

I am using a script called GrabHand, provided for me, it brings in the hand and grabbing functions....but I have no clue how to get my actions to work alongside this.

I can't post the grabhand script but any ideas would be great!

Jeff
04-01-2014, 09:30 AM
It sounds like you need to handle a grab event and then apply the action to the object.

rmcconnell11
04-01-2014, 12:10 PM
Yes, I got it working on a separate script where I add an arrow that is linked to the mouse tracker and it worked perfectly. But perhaps I am being incredibly stupid but I can't insert a hand model and link the hand to either the wiimote or viztracker to do the same thing ...... I am lost.
In viztracker it inserts a default hand, but I don't know how to add one on my own ..... Or eveeln get a handle on the default to use to search for intersections

Jeff
04-04-2014, 03:35 AM
You can get the hand model from the script that imports viztracker using the following code:
import viztracker
hand = viztracker.get('righthand')

Or if you want to use your own model instead you could try commenting out the createRightHand method and linking your model directly to the tracker inside the viztracker file:
composite.storeTracker( composite.RHAND, handTracker )
viz.link(handTracker,handModel)

If you're planning to upgrade to Vizard 5, the next Beta with vizconnect will have features (e.g. grabber tool) that will make these types of tasks much easier.

rmcconnell11
04-14-2014, 07:40 AM
OK not really getting anywhere, I am still lost specifically with how to call in the hand to my main script.
I have uploaded the viztracker file I am using along with the grabhand file.....the grabhand file creates the hand model and the physics etc to control grabbing functions!
So not entirely sure how to call the hand from the grabhand script into the main script.....am I going about this the right way?

I tried the viztracker method but it doesn't do anything, I don't even get a hand appearing on the screen!
Yes Jeff, I look forward to getting the grabber tool up and running on Vizard 5!!

rmcconnell11
04-25-2014, 08:53 AM
Anybody any ideas here?