Skip to content

Commit

Permalink
fixed #3646
Browse files Browse the repository at this point in the history
  • Loading branch information
Austyn Studdard authored and Austyn Studdard committed May 19, 2018
1 parent 60d35be commit 330e039
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/cameras/2d/Camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,8 @@ var Camera = new Class({
var cullW = cameraW + objectW;
var cullH = cameraH + objectH;

if (tx > -objectW || ty > -objectH || tx < cullW || ty < cullH ||
tw > -objectW || th > -objectH || tw < cullW || th < cullH)
if (tx > -objectW && ty > -objectH && tx < cullW && ty < cullH &&
tw > -objectW && th > -objectH && tw < cullW && th < cullH)
{
culledObjects.push(object);
}
Expand Down Expand Up @@ -753,7 +753,7 @@ var Camera = new Class({

/**
* Set the rotation of this Camera. This causes everything it renders to appear rotated.
*
*
* Rotating a camera does not rotate the viewport itself, it is applied during rendering.
*
* @method Phaser.Cameras.Scene2D.Camera#setAngle
Expand All @@ -774,7 +774,7 @@ var Camera = new Class({

/**
* Sets the background color for this Camera.
*
*
* By default a Camera has a transparent background but it can be given a solid color, with any level
* of transparency, via this method.
*
Expand Down Expand Up @@ -845,7 +845,7 @@ var Camera = new Class({

/**
* Set the position of the Camera viewport within the game.
*
*
* This does not change where the camera is 'looking'. See `setScroll` to control that.
*
* @method Phaser.Cameras.Scene2D.Camera#setPosition
Expand All @@ -868,7 +868,7 @@ var Camera = new Class({

/**
* Set the rotation of this Camera. This causes everything it renders to appear rotated.
*
*
* Rotating a camera does not rotate the viewport itself, it is applied during rendering.
*
* @method Phaser.Cameras.Scene2D.Camera#setRotation
Expand Down Expand Up @@ -926,7 +926,7 @@ var Camera = new Class({
* Set the position of where the Camera is looking within the game.
* You can also modify the properties `Camera.scrollX` and `Camera.scrollY` directly.
* Use this method, or the scroll properties, to move your camera around the game world.
*
*
* This does not change where the camera viewport is placed. See `setPosition` to control that.
*
* @method Phaser.Cameras.Scene2D.Camera#setScroll
Expand Down Expand Up @@ -978,7 +978,7 @@ var Camera = new Class({
* If you're trying to change where the Camera is looking at in your game, then see
* the method `Camera.setScroll` instead. This method is for changing the viewport
* itself, not what the camera can see.
*
*
* By default a Camera is the same size as the game, but can be made smaller via this method,
* allowing you to create mini-cam style effects by creating and positioning a smaller Camera
* viewport within your game.
Expand Down

0 comments on commit 330e039

Please sign in to comment.