Friction and damping properties not affecting physics body

Started by
0 comments, last by Octane_Test 6 years ago

I am developing a mini golf game in Scenekit. I have applied dynamic physics body to the ball and static physics body to the grass surface and the brick walls show in this image.

Issue:

When I apply the force to the ball, the ball’s linear and angular speeds change as shown in the graphs.  The ball’s speeds don’t reduce to zero (so that the ball can stop) but remains constant after certain value.

Ball linear speed graph

Ball angular speed graph

Analysis Tests:

  1. When I increase the values to both the rolling friction and the friction, the ball speed is reduced quickly but remains constant after certain value (similar to the above graphs).
  2. When I increase the values of the linear damping and the angular damping, the ball speed behavior is same as the point #1.
  3. When I set the gravity value to -9.8 m/s2, the ball’s linear speed remains constant after 0.1 m/s. If I reduce the gravity value to -5 m/s2, the ball’s linear speed remains constant after 0.05 m/s.
  4. The friction, linear friction, linear damping and angular damping are same throughout the motion of the ball.

  5. There is 1 millimeter overlapping between the ball and the surface of the golf course.

Questions:

  1. From the analysis test #3, I think the gravity is causing the constant ball speed issue. Is my assumption correct? If yes, how can I fix the issue? I can’t remove the gravity field as without the gravity field the ball will not roll along the grass and it will slide.
  2. Why the friction and the damping properties are not affecting the ball speed after certain value?

  3. Are there any other physics properties can cause such issue?

  4. From the analysis test #5, are there any chances that the ball is receiving upward push to correct the position of the ball?

Solutions:

  1. If I increase the physics timestep from 60 FPS to 200 FPS, the issue is resolved. I am not able to understand how this change can fix this issue?
  2. After reducing the gravity value to -1 m/s2 and physics simulation speed to 4 (4 times fast physics simulation), the issue is fixed. Again, I am not able to understand how this change fix the issue?

I would appreciate any suggestions and thoughts on this topic. Thank you.

This topic is closed to new replies.

Advertisement