Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tzachshabtay committed Apr 6, 2018
1 parent 2e92443 commit ecbb54a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Engine/AGS.Engine/Rooms/Viewport/AGSCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void Tick (IViewport viewport, RectangleF roomLimits, Size virtualResouti

var box = target.WorldBoundingBox;
var targetPoint = TargetPoint;
var parallaxSpeed = target.RenderLayer.ParallaxSpeed;
var parallaxSpeed = target.RenderLayer?.ParallaxSpeed ?? new PointF(1f, 1f);
var parallaxOffsetX = -viewport.X * (parallaxSpeed.X - 1f);
var parallaxOffsetY = -viewport.Y * (parallaxSpeed.Y - 1f);
float targetX = targetPoint == null ? target.WorldX : MathUtils.Lerp(0f, box.MinX, 1f, box.MaxX, targetPoint.Value.X);
Expand Down

0 comments on commit ecbb54a

Please sign in to comment.