Lấy thông tin chạm

Hệ thống nhập liệu
Phía máy khách
Cả Mobile và PC

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

Khai báo

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

Tham số

Input

Tên Kiểu Mô tả
Chỉ mục Int Distribute touch point IDs, starting from 0

Ra ngoài

Tên Kiểu Mô tả
Vị trí Vector2 Touch position
Delta vị trí Vector2 The shift in position compared to the last frame
Delta thời gian Float Time elapsed since last frame