RolePlayingGame – Unusual problem.

Home 3 Forums Tutorial Help Any Other Tutorials RolePlayingGame – Unusual problem.

This topic contains 2 replies, has 2 voices, and was last updated by  Jimmy Wilson 1 month ago.

  • March 20, 2017 at 2:21 pm #163438

    In the attackingArea the following code is causing me problems.

    class AttackArea: SKSpriteNode {

    func setUp() {

    let body:SKPhysicsBody = SKPhysicsBody(circleOfRadius: self.frame.size.width / 2, center: CGPoint.zero)

    // self.physicsBody = body // This is causing the Attacking Action to appear away from the Player
    // and also moves the position of the player at the same time

    When I let the self.physicsBody = body run then the skaction “Attacking” appears away from the player. The position appears random and the process also pushes the player across the screen.

    I have tried everything I can think off and as a last resort thought of posting this.

  • March 20, 2017 at 2:22 pm #163439

    Sounds like the two bodies are set to collide with each other. You set the collision bit masks?

  • March 20, 2017 at 3:05 pm #163442

    Thanks Justin.

    Earlier in the course you remmed out the collision mask for the player and I must have missed where you put it back in play. Everything working again…

    Must say I am enjoying your courses.

You must be logged in to reply to this topic.