rotation - how to sprites rotate with 90 degrees clicking every double tap on node in spritekit swift 3? -


i have 2 different nodes when tap on node rotate 90 degrees ,but want sprites rotate 90 degrees on every double tap not getting result.what should do? in advance trying code rotating 90 degrees: override func touchesbegan(_ touches: set, event: uievent?) {

for touch: uitouch in touches {   let touchlocation: cgpoint = touch.location(in: self)    if (ice.position.x > touchlocation.x) {     ice.zrotation = cgfloat(double.pi/2)   } else {     ice.zrotation = cgfloat(-double.pi/2)   }          } 


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -