From 569730f94a1d9da47967a24fad0323ef7d5b4119 Mon Sep 17 00:00:00 2001 From: Stefan Hedman Date: Tue, 3 May 2016 08:57:41 +0200 Subject: [PATCH] Added initial zero value to body.boundingRadius https://github.com/schteppe/cannon.js/issues/282 --- src/objects/Body.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/objects/Body.js b/src/objects/Body.js index a38054b14..671905db3 100644 --- a/src/objects/Body.js +++ b/src/objects/Body.js @@ -363,6 +363,13 @@ function Body(options){ */ this.aabbNeedsUpdate = true; + /** + * Total bounding radius of the Body including its shapes, relative to body.position. + * @property boundingRadius + * @type {Number} + */ + this.boundingRadius = 0; + this.wlambda = new Vec3(); if(options.shape){