Physics: Ball Bounces Unexpectly Based Upon Size + Ring Collision Shape
I have modified an example physics script to try and determine why my script isn't working. I want my "ball.wrl" to remain stationary on the ground (as it would in real life because gravity keeps it on the ground). However, this only seems to work if the ball scale is very small (0.1,0.1,0.1) versus large (10,10,10). If the scale is large, the ball takes an initial bounce and then remains stationary. I've set ball bounce equal to zero, so I'm not sure why the ball bounces. (I realize the "bounce" effect scales with size, but I would like to get rid of the initial effect from the beginning).
Code:
#meshing Thanks for your time! |
1 Attachment(s)
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:
viz.add('shaft.dae', pos = (0,0,0)) |
If modifying the physics properties of the object is not working the way you expect, you could try removing all forces on the ball once it reaches a certain position. To do that, use the node3d.reset command.
|
Jeff, thanks for your reply.
I think I found the problem (for the 2nd example) was because the ball's center was at (0,0,0) and the position was initially (0,0,0) as well. Therefore, the ball was initially colliding with the ground and thus it pops or bounces up. If I moved the initial position to (0,.25,0), then I didn't notice a bounce. Thanks again! |
All times are GMT -7. The time now is 08:14 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC