Collision is the collision manager. It provides basic 2d collision detection functionality. Note: this is not a physics engine, its only for detection and objects picking.
To access the Collision manager you use Shaku.collision
.
Kind: global class
Create the manager.
The collision resolver we use to detect collision between different shapes. You can use this object directly without creating a collision world, if you just need to test collision between shapes.
Kind: instance property of Collision
Get the collision reactanle shape class.
Kind: instance property of Collision
Get the collision point shape class.
Kind: instance property of Collision
Get the collision circle shape class.
Kind: instance property of Collision
Get the collision lines shape class.
Kind: instance property of Collision
Get the tilemap collision shape class.
Kind: instance property of Collision
CollisionWorld
Create a new collision world object.
Kind: instance method of Collision
Returns: CollisionWorld
- Newly created collision world.
Param | Type | Description |
---|---|---|
gridCellSize | Number | Vector2 |
Collision world grid cell size. |