IgeEntity

Method: localAabb

Calculates and returns the local axis-aligned bounding box for the entity. This is the AABB relative to the entity's center point.
localAabb (Boolean recalculate)
  • Booleanrecalculate If true this will force the recalculation of the local AABB instead of returning a cached value.
Returns IgeRect The local AABB.

Get the entity local axis-aligned bounding box dimensions

var aabb = entity.localAabb();

console.log(aabb.x);
console.log(aabb.y);
console.log(aabb.width);
console.log(aabb.height);

Get the entity local axis-aligned bounding box dimensions forcing the engine to update the values first

var aabb = entity.localAabb(true); // Call with true to force update

console.log(aabb.x);
console.log(aabb.y);
console.log(aabb.width);
console.log(aabb.height);
© Copyright 2013 Irrelon Software Limited. All Rights Reserved. UK Registered Company Number: 07522767
Isogenic (ī´sōjen´ik): Adj originating from a common source; possessing the same genetic composition.
Strange Things Happen at the One Two Point