Aller au contenu principal

Touch:move()

Performs a touch move action to the specified coordinates or point.

Signature

move(x: number, y: number): void
move(fingerId: number, x: number, y: number): void
move(fingerId: number, point: Point): void
move(point: Point): void

Parameters

ParameterTypeDescription
fingerIdnumberThe ID of the finger to use for the touch (optional)
xnumberThe x-coordinate of the touch point
ynumberThe y-coordinate of the touch point
pointPointA point object containing x and y coordinates

Returns

  • Type: void

Examples

Touch:init()

-- Simple touch move to coordinates
Touch:move(100, 200)

-- Touch move with finger ID
Touch:move(1, 100, 200)

-- Touch move using Point
local point = Point(100, 200)
Touch:move(point)

-- Touch move with finger ID using Point
Touch:move(1, point)