Skip to main content

Set move step length (:step_len)

Declaration

te = te:step_len(step)

Parameters

  • step
    Integer, optional. Default: 2.

Returns

  • te
    Touch event object itself. You can get a touch event object via touch.on.

Notes

  • Set the step length when using :move to slide.

Example

-- Touch at 100,100, slide to 200,200 with step length 3 and per-step delay 0.2 ms, then lift
touch.on(100, 100):step_len(3):step_delay(0.2):move(200, 200):off()