View Single Post
  #2  
Old 11-10-2014, 03:13 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
1) Make sure the walls are added to the haptic simulation using the device.addNode(node) command. The front of the car (not center) should be aligned with the haptic device if you want resistance when the front touches the wall.

2) The following code should add a spring effect:

Code:
import viz
viz.go()

sensable = viz.add('sensable.dle')
device = sensable.addHapticDevice()
spring = device.addSpringEffect(gain=0.2,magnitude=0.5,position=[0,0,0])
Reply With Quote