Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

More radar view changes

  • Loading branch information...
commit 0742c2d67cf3d3a667fd7b63201f65abcdff491c 1 parent 993a643
@utahguy utahguy authored
View
BIN  ...t.xcodeproj/project.xcworkspace/xcuserdata/guy.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown
View
6 ARTest/ARLRadarView.m
@@ -68,9 +68,9 @@ - (void) drawRect:(CGRect)rect
// Set the circle fill color to green
CGContextSetRGBFillColor(contextRef, 252.0, 130.0, 0.0, 1.0);
for(ARLPlayer* player in [ARLPlayersManager instance].players) {
-
- playerCenter.x = screenCenter.x + scale * player.distanceFromMe.floatValue * cos(player.angle.floatValue);
- playerCenter.y = screenCenter.y + scale * player.distanceFromMe.floatValue * sin(player.angle.floatValue);
+ float angle = player.angle.floatValue - degreesToRadian([ARLPlayersManager instance].currentHeading.trueHeading);
+ playerCenter.x = screenCenter.x + scale * player.distanceFromMe.floatValue * cos(angle);
+ playerCenter.y = screenCenter.y + scale * player.distanceFromMe.floatValue * sin(angle);
CGContextAddArc(contextRef,playerCenter.x, playerCenter.y, 4, 0,2*3.1415926535898,1);
CGContextDrawPath(contextRef,kCGPathFill);
}
Please sign in to comment.
Something went wrong with that request. Please try again.