Skip to content

Commit

Permalink
isIntersectingRay allows for non-mouseenabled entities to be checked
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-bateman committed Jan 25, 2013
1 parent 479ff5a commit f7d8393
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/away3d/core/partition/EntityNode.as
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,24 @@ package away3d.core.partition
*/
override public function isInFrustum(camera : Camera3D) : Boolean
{
if (_entity.isVisible == false) return false;
if (!_entity.isVisible) return false;

_entity.pushModelViewProjection(camera);

if (_entity.bounds.isInFrustum(_entity.getModelViewProjectionUnsafe()))
return true;
else
_entity.popModelViewProjection();
return false;

_entity.popModelViewProjection();

return false;
}

/**
* @inheritDoc
*/
override public function isIntersectingRay(rayPosition : Vector3D, rayDirection : Vector3D) : Boolean
{
if (!_entity.isVisible || !_entity._ancestorsAllowMouseEnabled || !_entity.mouseEnabled) return false;
if (!_entity.isVisible) return false;

return _entity.isIntersectingRay(rayPosition, rayDirection);
}
Expand Down

0 comments on commit f7d8393

Please sign in to comment.