• Create Account

Banner advertising on our site currently available from just \$5!

### #ActualLorenzoGatti

Posted 12 July 2013 - 01:51 AM

If you want the ball to "stand" still where the red circle is, you should apply forces that cancel out gravity, or (to get a more exact result) set velocity to 0 every frame until the ball should start moving.

If you want the ball to never lose contact with the hill as it rolls left to right, you should reduce its speed. At all times, the parabolic trajectory that the center of the ball would follow without obstacles and without external forces must lie within the Minkowski sum of the hill and the ball (meaning that the ball "tries" to sink underground and there is friction).

In both cases, setting position shouldn't be needed.

### #1LorenzoGatti

Posted 12 July 2013 - 01:51 AM

If you want the ball to "stand" still where the red circle is, you should apply forces that cancel out gravity, or (to get a more exact result) set velocity to 0 every frame until the ball should start moving. If you want the ball to never lose contact with the hill as it rolls left to right, you should reduce its speed. At all times, the parabolic trajectory that the center of the ball would follow without obstacles and without external forces must lie within the Minkowski sum of the hill and the ball (meaning that the ball "tries" to sink underground and there is friction). In both cases, setting position shouldn't be needed.

PARTNERS