ios - SpriteKit -- Change SKShapeNode Size -
i have skshapenode created shapenodewithrect: cornerradius:. rounded rect child of skeffectnode can set shouldrasterize = yes.
i'd change width of node based on user's touch. i.e. move finger horizontally right, rect gets bigger (and smaller when move left).
- i can replacing original
skshapenodenew 1 new size (but bad). - i've tried running resize action on
skeffectnode,skshapenode(but doesn't work because resize works onskspritenotes[skaction apple docs -- resize]):
[self runaction:[skaction resizetowidth:newsize.width height:newsize.height duration:0]]; [self.shapenode runaction:[skaction resizetowidth:newsize.width height:newsize.height duration:0]];
- i change xscale in answer: change height of skshapenode. if this,
skshapenodegets pixelated.
how should this?
it's easy in uikit (just set frame of uiview)...
Comments
Post a Comment