View Single Post
#2
11-01-2012, 07:44 AM
 mhead10 Member Join Date: Mar 2012 Posts: 40
I see the ring question has been answered here.

However, I would still benefit from someone helping with my first question. How do I get rid of initial "bounce" and "wobble" of a node?

Here's another example to demonstrate my question:
If I have a ball sitting atop a hole which is slightly smaller than the diameter of the ball, and gravity or a force is enabled, my ball doesn't "sit still" atop the hole. Rather, it wobbles around the hole for several seconds until it eventually slows down and sits atop the hole. If the collision plane and ball is perpendicular to gravity, shouldn't the ball's position remain initially constant and not wobble around?

My attached pictures shows one of the balls wobbling around the hole instead of its position remaining constant.

Code:
base = viz.add('base.dae', scale=[1,1,1],euler=[0,0,0], pos = (-2.5,0,-2))
base.texture(pic_base)

sphere1 = viz.addChild('ball.dae', viz.WORLD, pos = (-.65,.17,.84), scale=[0.4,0.4,0.4],euler=[0,0,0], texture=(pic_sphere))
sphere2 = viz.addChild('ball.dae', viz.WORLD, pos = (-.65,.2,-.19), scale=[0.4,0.4,0.4],euler=[0,0,0], texture=(pic_sphere))
sphere3 = viz.addChild('ball.dae', viz.WORLD, pos = (-.65,.2,-1.18), scale=[0.4,0.4,0.4],euler=[0,0,0], texture=(pic_sphere))
sphere4 = viz.addChild('ball.dae', viz.WORLD, pos = (-1.64,.2,.82), scale=[0.4,0.4,0.4],euler=[0,0,0], texture=(pic_sphere))
sphere5 = viz.addChild('ball.dae',viz.WORLD, pos = (-1.64,.2,-.19), scale=[0.4,0.4,0.4],euler=[0,0,0], texture=(pic_sphere))
sphere6 = viz.addChild('ball.dae', viz.WORLD, pos = (-1.64,.2,-1.18), scale=[0.4,0.4,0.4],euler=[0,0,0], texture=(pic_sphere))

base.collideMesh()
viz.phys.setGravity(0,-10,0) #world gravity
sphere1.collideSphere(bounce = 0)
#sphere1.applyForce([0,0,-2])
#ringPhys = sphere2.collideSphere(bounce = 0)
#ringPhys = sphere3.collideSphere(bounce = 0)
#ringPhys = sphere4.collideSphere(bounce = 0)
#ringPhys = sphere5.collideSphere(bounce = 0)
#ringPhys = sphere6.collideSphere(bounce = 0)

#Grab or let go of the ring