Simple (very much so) physics engine.
Blitz3D Forums/Blitz3D Beginners Area/Simple (very much so) physics engine.
| ||
ok i know there are some physics engines out there, but they look complex to use (though i haven't looked into them a ton) and i was thinking it musn't be that hard to code a simple "drop and fall" engine that would be able to handle basically just say ive got a cube that is falling at an angle, once it hits the ground physics would kick in and essentially rotate it to a flat side Via gravity. any help at all here? :) P.S. i have no idea if i am overusing these forums too much or not, i just have a lot of things i want to do right and make sure i can make the right mistakes. If i am overusing them please let me know. |
| ||
Filax just released EasyTok for free. It used to be a commercial Blitz3D physics wrapper. You might want to take a look: http://blitz3dfr.com/hedgehog/data/documents/EasyTok.zip (Originally from Blitz3DFR) |
| ||
thank! will do :) |
| ||
hmm it does not seem to download for me... :/ |
| ||
How about a simple angular calculation ala breakout? Pseudo: If we fell then if we hit then delay a bit (based on velocity) else we're done delaying... if impact angle>180 then rotate -1 if impact angle<180 then rotate +1 end if end if I did a real simple fall routine in my gameinputupdate routine without impact rotation |
| ||
of course this doesn't account for terrain slope, but I believe there's a command for that somewhere... |
| ||
oh wow i didnt even see this, thanks for the response :) |
| ||
Mousey try to help kitty, he he |
| ||
please dont eat me... :( |
| ||
Two physics engines here: http://www.blitzbasic.com/Community/posts.php?topic=92434#1053339 The Verlet-based engine is pure Blitz code, but also much slower than ODE. ...I wouldn't actually recommend either for production use, but you can take a look to see just how complex physics is (e.g. all that code used in the Verlet engine... isn't enough to make an even half serviceable physics engine: the ODE one is probably the bare minimum). |
| ||
how fast do you think easytok is? i was excited at first till i saw the frame rate X) |
| ||
If you have US$13 to spare you can get a license of BlitzBullet: http://tools.mirage-lab.com/ - By Mirage-lab Team. That is sure to have a good performance. They made a commercial game with it (probably the best current example of what one can achieve with Blitz3D). |
| ||
Kryzon mirage lab use PhysX lib on your game. Last edited 2012 |