You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When tapping quickly many times on the TLAnalogJoystickHiddenArea node and progressively moving your touches outside of its frame, I noticed that it can capture touches outside of its frame which can place the TLAnalogJoystick outside of the hidden area.
I wasn't able to isolate the root cause of this, but here's a suggested solution, modifying TLAnalogJoystickHiddenArea's touchesBegan method to sanity check touchLocation before proceeding further. This fixed the issue on my end.
class TLAnalogJoystickHiddenArea: SKShapeNode {
...
open override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
guard let currJoystick = self.currJoystick else {
return
}
let firstTouch = touches.first!
let touchLocation = firstTouch.location(in: self.scene!)
guard let path = self.path, path.contains(touchLocation) else {
return
}
currJoystick.position = touchLocation
currJoystick.isHidden = false
currJoystick.touchesBegan(touches, with: event)
}
...
}
The text was updated successfully, but these errors were encountered:
When tapping quickly many times on the
TLAnalogJoystickHiddenArea
node and progressively moving your touches outside of its frame, I noticed that it can capture touches outside of its frame which can place theTLAnalogJoystick
outside of the hidden area.I wasn't able to isolate the root cause of this, but here's a suggested solution, modifying
TLAnalogJoystickHiddenArea
'stouchesBegan
method to sanity checktouchLocation
before proceeding further. This fixed the issue on my end.The text was updated successfully, but these errors were encountered: