View Single Post
  #2  
Old 12-21-2005, 10:09 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

This would require the use of a joint to control the balls position while performing dynamics on it. Currently, the physics plugin doesn't have an interface for creating joints.

Instead of linking the sensor to the ball, use the following code in your timer to place it manually.
Code:
data = sensor1.get()
myBall1.translate(data[:3])
myBall1.rotate(data[3:6])
myBall1.reset() #Reset physics on ball
myBall1.enable(viz.PHYSICS)
It won't be perfect, but it's the best you can do without performing the physics manually.
Reply With Quote