Full documentation and demos are available in this link!
Introduction
PlayCanvas is an excellent WebGL game development engine
that is well suited to many tasks. One of the major limitations
however is its reliance on Ammo.js - an Emscriptem compilation
of the Bullet physics library.
Bullet is a fantastic library, a brilliant piece of work,
but when used in PlayCanvas - especially on mobile
it causes slow frame rates and significant garbage
collection cycles.
New users especially fall foul of relying on the inbuilt
physics only to find their game will never perform
the way they want.
There are times when you need a physics engine, but
much of the time you can simply get away with collision
detection. More advanced games require raycasts and full
protection from object penetration too.
Collision Detection is a library designed to fulfil the
need for robust, fast collision detection and object
separation that is suitable for mobile games built
with PlayCanvas. It fully support raycasting and
compound colliders.
Features
Collision Detection supports the following features:
- Very high performance broad and narrow phase collision
detection - Raycasts with multiple hits
- PlayCanvas collision components of the types: Box,
Sphere, Capsule and Mesh - Script function call backs on the colliding object
and any parent that defines a suitable callback - Collision events
- A “Simple” rigid body that prevents object penetration
and allows simple pushing of objects in the world