Physical body size does not change with resizing SKSpriteNode using the touch move method

I am trying to create a spring launcher where, when you drag a touch to the scene, spring will wrap like a touch drags, and trigger the element above the spring method at the touch end. To do this, I changed the size and position of the SKSpriteNode method in touch, like -

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 physical body of SKSpriteNode does not change it, as it is - enter image description here

Please help .. And if the physical body of the SCSpriteNode changes than it, is too far behind the device.

let springTexture    =   SKTexture(imageNamed: "spring-wire")
launcher.physicsBody = SKPhysicsBody(texture: springTexture, size: launcher.size)
launcher.physicsBody?.dynamic = false

Is there a way to resize a physical body after creating it once?

+4
source share
1 answer

, yScale SKSpriteNode, touchphonesMoved method

launcher.yScale =   launcher.yScale-0.008
launcher.position  =   CGPointMake(frame.size.width*0.97, launcher.size.height/2)

, , SKSpriteNode .

+2

All Articles