PDA

View Full Version : Mimicing Haptic Touch Events


njstaley
06-28-2010, 11:40 AM
I'm writing a script where the user will control a hand with a phantom onmi haptic pen. In this script, I would like to have either one finger, on an object that the user picks up as the 'location' of the haptic pen. I dont want to position the hand so that the finger is at the haptic pen location, as the area that I would like to monitor will change as the script runs and moving the hand to accomidate would look unrealistic.

Ideally I would be able to detect a touch event against this new point in space and apply the resulting forces to the haptic pen. At the moment, I am trying to do this by sending a sensable.TOUCH_EVENT whenever I detect a 'toch' (collision at the moment) between the new point and a haptic node. Unfortunately this does not seem to respond at all, and the hand only reacts when the center (original haptic point) touches an object.

Which finally brings me to my questions: is it possible to have the haptic pen react as though it touched a certain object even when it did not, or what effects does a standard touch event apply to the haptic pen so that the touch events can be imitated?

Thank you for your Time

farshizzo
06-29-2010, 02:58 PM
The TOUCH_EVENT is generated internally by the haptic device. Manually generating a TOUCH_EVENT will have no effect on the device.

I don't fully understand what you are trying to accomplish, but if you want to manually apply a force to the pen then you can use a constant force effect. The docs should mention how to create various effects for the haptic device.