I am trying to create a spring launcher where when touch is moved on scene the spring will coil as much the touch is dragged down and thn launch the item above the spring on touch end method. For that i changed the size and position of SKSpriteNode in touch move method as -
launcher.position = CGPointMake(frame.size.width*0.97, launcher.position.y-1)
launcher.size = CGSizeMake(frame.size.width*0.05, launcher.frame.size.height-2)
But the Physics body of SKSpriteNode not changing it comes like this -
Please help.. And if a change physics body of SKSpriteNode than it lags on device too much..
let springTexture = SKTexture(imageNamed: "spring-wire")
launcher.physicsBody = SKPhysicsBody(texture: springTexture, size: launcher.size)
launcher.physicsBody?.dynamic = false
Is there any way to change size of Physics body after creating it once?