loadPolygon(key, object) → {boolean}
Reads the shape data from a physics data file stored in the Game.Cache and adds it as a polygon to this Body.
As well as reading the data from the Cache you can also pass null as the first argument and a
physics data object as the second. When doing this you must ensure the structure of the object is correct in advance.
For more details see the format of the Lime / Corona Physics Editor export.
Parameters
| Name | Type | Description | 
|---|---|---|
key |  string | The key of the Physics Data file as stored in Game.Cache. Alternatively set to   |  
object |  string | object | The key of the object within the Physics data file that you wish to load the shape data from,  |  
Returns
True on success, else false.
- Source code: physics/p2/Body.js (Line 1422)
 
Please login to continue.