- #1
heisenbergman
- 2
- 0
Hi PF.
I'm currently developing a 2D platform game that is significantly physics-based using the Box2D physics engine.
However, one of my main problems right now is that the main "character" of my game is a ball and unfortunately, Box2D does not support rolling friction. The result is that whenever I apply horizontal force to the ball and it starts moving on a flat surface... it never stops.
There are some quick ways I could fix this given Box2D's current features (e.g. - damping)... but those solutions don't seem realistic enough in certain scenarios. What I'm
planning to do is to handle rolling resistance in my code using actual physics equations and hopefully that yields more realistic results.
So, what I wanted to ask was that with all of the following given information, how do I compute for the change in speed over time of a rolling ball due to rolling friction?
Available information:
- mass of ball
- size of ball
- force being applied on the ball
- speed of the ball
- coefficient of rolling friction (I can probably set this to a constant value inside the program)
Thanks!
I'm currently developing a 2D platform game that is significantly physics-based using the Box2D physics engine.
However, one of my main problems right now is that the main "character" of my game is a ball and unfortunately, Box2D does not support rolling friction. The result is that whenever I apply horizontal force to the ball and it starts moving on a flat surface... it never stops.
There are some quick ways I could fix this given Box2D's current features (e.g. - damping)... but those solutions don't seem realistic enough in certain scenarios. What I'm
planning to do is to handle rolling resistance in my code using actual physics equations and hopefully that yields more realistic results.
So, what I wanted to ask was that with all of the following given information, how do I compute for the change in speed over time of a rolling ball due to rolling friction?
Available information:
- mass of ball
- size of ball
- force being applied on the ball
- speed of the ball
- coefficient of rolling friction (I can probably set this to a constant value inside the program)
Thanks!