Verlet physics with constraint collisions
Community Forums/Showcase/Verlet physics with constraint collisions
| ||
Hi all, I have been working on some verlet physics in xna lately and got some pretty good results, after some trial and error I must say :) I decided to convert most of the physics code to blitz3d, just to see it run there as well, and this is what have come out of it: ![]() and the codes, just copy - paste into your favourite blitz 3d editor and press compile and run, no external files needed: It is added to the code archives as well. There is some 3d rendering of lines and points in there (because the line and plot commands are so slow) as well as a space partitioning system for much faster collision queries, just press space in the demo to see the difference in comparisons. |
| ||
nice job. I dont have constraint colllisions in my engine yet but maybe this would help :) |
| ||
Nice example, I had some fun firing the boxes of the middle bars :) Thanks for sharing your code as well. |
| ||
Not bad. Collisions aren't very accurate for some reason? |
| ||
@stevie G are you referring to the fact that his constraints are really thick but the physics engine doesnt show it on the screen? |
| ||
@stevie G are you referring to the fact that his constraints are really thick but the physics engine doesnt show it on the screen? Yeah, I didn't look at the code - I thought that might be the reason. |
| ||
Thanks for your replies Each spring has a 'thickness' which is not rendered accordingly, although the line thickness can be set via a parameter in SimulationRender3D. |
| ||
so are you planning to continue work on this and make it a full physics engine or is this its final stage? |
| ||
I plan on working a bit more on it, but in C# and not in blitz, although I might convert the final version to blitz again, with some minor hacks since blitz3d don't have classes and generics. And since I don't own BlitzMax it will not be converted to that, although I might give the demo a look. But my main priority is to make a game in xna with it. |