Get Touch Info

Input System
Client Side
Both Mobile and PC

Get the specified index screen touch information (including position, displacement, and change time).

Declaration

func GetTouchInfo(index int, out var position Vector2, out var deltaPosition Vector2, out var deltaTime float)
go

Parameters

Input

Name Type Description
Index Int Distribute touch point IDs, starting from 0

Out

Name Type Description
Position Vector2 Touch position
Delta Position Vector2 The shift in position compared to the last frame
Delta Time Float Time elapsed since last frame