- #1
deluksic
- 21
- 0
Im making a simulation of ball physics... As the title says i have a problem with friction.
So i have a ball with radius, mass, speed... And the ball hits a wall with some speed on an angle.
i calculate horizontal and vertical speed in relation to wall with sin and cos...(i need actuall friction not F=m*g*k not like that that is just the maximal friction)
then i get stuck. I did it somehow but something isn't right... u can check simulation here:
https://sites.google.com/site/deluksicgames/contact-us (the third download)
i thought like this: when a ball hits a wall, it has some vertical force on a wall so i calculate it like this: Fy = Vertical speed * mass (time is one step so i don't need it), then i calculate max fric. Fmax = Vspeed * mass * k, and then i calculate actuall friction with some weird equation and it looks good but i need real equations for this. hope u understand me
So i have a ball with radius, mass, speed... And the ball hits a wall with some speed on an angle.
i calculate horizontal and vertical speed in relation to wall with sin and cos...(i need actuall friction not F=m*g*k not like that that is just the maximal friction)
then i get stuck. I did it somehow but something isn't right... u can check simulation here:
https://sites.google.com/site/deluksicgames/contact-us (the third download)
i thought like this: when a ball hits a wall, it has some vertical force on a wall so i calculate it like this: Fy = Vertical speed * mass (time is one step so i don't need it), then i calculate max fric. Fmax = Vspeed * mass * k, and then i calculate actuall friction with some weird equation and it looks good but i need real equations for this. hope u understand me