So I’ve decided to bite the bullet ( ) and try to build a complete physics system for PlayCanvas. There are basically three types of help I need:
- Review and input to the requirements
- Development and mathematical support
- Testing of the iterations
I’d be delighted if anyone would like to pitch in.
At present my theory is basically this:
- Simple physics with fast resolution
- Not an “engineering grade” simulation - but one that looks ok
- No object penetration at the expense of incorrect conservation of energy and one frame partial loss of velocity
- Imperfect friction and sliding in stacks of non-sleeping bodies
- Support for Capsule/Box/Sphere and Convex mesh - no possibility of any support for concave meshes without dividing objects into multiple convex shapes
- Spring joints, ball joints, rods (without breaking strengths in the first releases)
- No support for joint motors in the first releases
- Basic isotropic friction (not directional) and simple restitution
- Use Speculative Collisions - (this basically means things never collide and get penetration resolved, rather they just touch - this has an effect of bleeding a little energy during a physics step, but is faster to do and generally more stable). The technique used is call Conservative Advancement and supports rotational collisions.
- Use sequential impulses - this is way faster than the other choice (using a technique called LCP to resolve all collisions at once by root solving) - but provides less realistic interactions. Non-sleeping bodies might slide unrealistically when stacked for instance.
- I intend to do contact categorisation via GJK and closest point resolution to identify 6 possible types of contact and code special cases for them (vertex/vertex, vertex/edge, vertex/face,edge/edge (non parallel),edge/face,face/face) excluding the special case of edge to edge perfect collision.
What I need from you
- How do you want to use physics in games? What game styles are you looking for?
- How do you want to move your entities in the physics world? Forces? Kinematics?
- Mathematical support if you know one end of a Jacobian root solver from another then I definitely need your help
- Testing stuff when it comes available - might need to test and build specific code for different cases.
- Help in developing test cases
- Help in coding/debugging - once I have the basic structure
Let’s say goodbye to Ammo and build something fast enough for our games!