Archived

This topic is now archived and is closed to further replies.

trust

strange problem

Recommended Posts

Hi everybody! I''m creating a virtual billiard game. For this game, I use ODE and GLUT. I don''t know if you''ve heard of ODE, anyway it''s not important, because I don''t think the problem comes from it. I have this ball, rolling at a constant velocity: (velX, velY, velZ) In order to stop it, I apply on it a force whose values are opposed to the velocity: force(-velX*0.1, -velY*0.1, -velZ*0.1) This should slow down the ball. But when I read continuously the values of the velocity, it never slows down. But the force is here, I can read its values. Anyway, when I start clicking on the "render" window, magically, the ball starts slowing down. I''ve never seen such a thing. Any Idea? trust

Share this post


Link to post
Share on other sites
Well, your function is exponential and friction results in a constant deceleration proportional to the normal force. But that''s not the problem. Try putting the deceleration in your rendering function (based on time of course).

Share this post


Link to post
Share on other sites