I'm trying to rotate a SKSpriteNode based on pan gesture. I figured out the only way to detect pan is to insert small code in the GameViewController.swift. To rotate the sprite on pan, I must call for a rotate function in my scene file. I tried doing PlayScene.rotateTommyLeft()
but it gives me error saying Missing argument for parameter #1 in call
which is weird cause the function rotateTommyLeft shouldn't require a parameter. I'm posting it below.
func rotateTommyLeft()
{
tommy.zRotation--
}