How do I resize a SKShapeNode?
box.frame.width = 10
Gives the error Cannot assign to the result of this expression
let actionResize = SKAction.resizeToWidth(10, duration: NSTimeInterval(0.1))
box.runAction(actionResize)
Nothing happens
box.xScale = 0.1
Scales the node instead of resizing
The action, resizeToWidth
, can be called by an SKSpriteNode.
You can call the action,
scaleTo
, with SKShapeNode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With