Thought i’d give a 3d physics engine a go.
Only have spheres and basic planes working, its going well so far, but i’m expecting some problems/limitations.
Still needs cubes,polygons, and some of the variables (gravity,density,restitution).
I’m making the sytax as similar to codea’s 2d physics as possible so it should be familiar and easy to use.
@Jaybob - I think the real test is with collisions, when you have to work out deflection angles and rotation (in 3D) for different shapes. The reason Box2D is not Box3D is most likely due to the complexity of collisions, which are difficult enough in 2D.
In your video, the spinning that occurs on collisions seems to be fairly standard - is it based on actual forces, or a fixed animation?
@Ignatz yeah the rotation is a fixed amount, it needs to account for velocity mass and friction so its just a placeholder for now, but the axis is relative to the collision, also has angularDamping on.
@Jaybob - very impressive. How many faces do your spheres have?
It’s been an age since I’ve done any serious work with collisions in 3D I’m guessing you’re starting with spheres as the maths and bounding boxes are all circles and you can (in theory) ignore orientation etc
@Jaybob - it’s a brave attempt, but judging by the expert views I’ve read on this (because I looked at this once), accurate 3D collisions and rotations are hellishly difficult. Good luck with the next step!