martedì 9 agosto 2016

Day 165: Friction fixed...maybe

Today I found after a painful amount of time the problem with friction. And of course, for the thousandth time in my life, it was a radians/degree problem.
Basically my whole engine is implemented with degrees, and this was not a problem for the most part, but while using the angular velocity to get the linear velocity in the contact point, it was mandatory to use radians.
Now as you can see from the gif both rotation and velocity are fine.

However there is a new problem: once the object velocity is resolved, it will continue to rotate (and slide) indefinitely. This is probably because the impulse to resolve the angular rotation is applied to the center of the body, instead of the contact point. This is fine for a point object, but not for a volumetric body.

The problem now is to understand if it is my fault, and something should've been done differently, or if this is a normal behaviour that should be resolved with rolling friction, which logically is exactly the kind of force that would solve it.


Nessun commento:

Posta un commento