extends StaticBody
var touch
var drag
func _input(event):
if event is InputEventMouseButton:
if event.pressed:
touch = event.position.y
if event is InputEventScreenDrag:
drag = event.position.x
if touch - drag > 10:
self.rotate_z(-.03)
if drag - touch > 10:
self.rotate_z(+.03)