0 Replies
      Latest reply on May 14, 2020 2:07 PM by AdneyJamesPorter
      AdneyJamesPorter Level 1 Level 1 (0 points)

        Hey, I currently have my SKCamera node centered over my player perfectly in the screen, I am wondering if anyone can help in how I can place the camera node just ahead of player? This is the code I have currently : In GameScene : var screenCenterY:CGFloat = 0 In didMove function screenCenterY = self.size.height / 2 In didSimulatePhysics var cameraYPos = screenCenterY cam.yScale = 1 cam.xScale = 1 Self.camera!.position = CGPoint (x: player.position.x, y: cameraYPos I’m trying to position the player on the left of the screen whilst the camera stays in the middle?? New to Xcode - any help / suggestions are much appreciated. I assume my problem is that I am referencing the player position, whereas I should be taking the coordinators for the middle screen only? My player position has already been defined in the player class at (x: 50, y:250) Thanks, AJ