Skip to content

Instantly share code, notes, and snippets.

@bomatson
Created March 14, 2014 21:10
Show Gist options
  • Save bomatson/9557007 to your computer and use it in GitHub Desktop.
Save bomatson/9557007 to your computer and use it in GitHub Desktop.
def on_frame(*args)
frame = args[1]
return if frame.pointables.empty?
set_finger_from(frame)
if @finger
x_position = @finger.tipPosition[0]
y_position = @finger.tipPosition[1]
y_velocity = @finger.tipVelocity[1]
end
#...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment