| Author: |
|
| Dated: |
Thursday, September 08 2005 @ 09:53 PM NZST |
| Viewed: |
343 times |
|
I'd intended to implement some way to move the view, and maybe a better way of rendering the soft bodies, but I'm just too darn lazy. Speaking of which, I should really be studying right now.
Anyway, get the soft body physics prog here. The basic idea is to make models look like like jelly or a rubber ball or something in between. Once it's running, press space to lift up some of the models points. One thing I think is cool is the way the 2 pluses in the cpp model move almost identically. Have fun!
Read more for some things I encountered along the way.
I originally had a variable time step, which worked ok, except whenever some other program took some cpu time the thing would jump. So I switched it to a fixed time step, but left the framerate variable, which was much better. Then, even though I couldn't be bothered adding any real collision, I made the collision I had swept. That is, I'd find the time at which a point was going to hit the ground plane, rather than how to move it out of the ground. I even set up the friction to be applied for the amount of time step the point is touching the ground. But there was a slight problem. The points touching the ground would jitter slightly, just a couple of pixels. I eventually decided it was probably just the time of intersection doesn't give that accurate an intersection point when you multiply it by the velocity. So, as a cheap hack, I set the y of the point to the height of the ground plane afterwards. Worked like a charm.
|
Trackback URL for this entry: http://razorcode.net/trackback.php/20050908035351735
No trackback comments for this entry.
|