diff --git a/GoneBananas/GoneBananasShared/CCPhysicsSprite.cs b/GoneBananas/GoneBananasShared/CCPhysicsSprite.cs index de0649d..8c34bfa 100644 --- a/GoneBananas/GoneBananasShared/CCPhysicsSprite.cs +++ b/GoneBananas/GoneBananasShared/CCPhysicsSprite.cs @@ -20,29 +20,12 @@ public void UpdateBallTransform() { if (PhysicsBody != null) { - b2Vec2 pos = PhysicsBody.Position; + b2Vec2 pos = PhysicsBody.Position; - float x = pos.x * ptmRatio; - float y = pos.y * ptmRatio; + float x = pos.x * ptmRatio; + float y = pos.y * ptmRatio; - if (IgnoreAnchorPointForPosition) - { - x += AnchorPointInPoints.X; - y += AnchorPointInPoints.Y; - } - - // Make matrix - float radians = PhysicsBody.Angle; - var c = (float)Math.Cos (radians); - var s = (float)Math.Sin (radians); - - if (!AnchorPointInPoints.Equals (CCPoint.Zero)) - { - x += c * -AnchorPointInPoints.X + -s * -AnchorPointInPoints.Y; - y += s * -AnchorPointInPoints.X + c * -AnchorPointInPoints.Y; - } - - Position = new CCPoint(x, y); + this.Rotation = -1 * PhysicsLayer.RADTODEG * PhysicsBody.Angle; } } }