Table Realms uses emulated touch functionality in Unity Tiny, which allows players to provide inputs into the game world using touchable devices.
Before the touch functionality can be used, it needs to be initialised within the UTiny project. This is done by using the Table Realms Tiny API to call the following function:
TableRealmsTiny.Input.InitializeTouch(GetMyID(), GameSystem.world);
This function is used in your game’s script file to set up and register the actions and events that are required for the Table Realms touch passthrough components to work.
Once the touch input component has been initialised in UTiny, it can be used to perform a number of different functions.
GetPosition () - Used to return the coordinates of the latest touch position.GetPosition().x - Used to return the horizontal coordinates of the latest touch position.GetPosition().y - Used to return the vertical coordinates of the latest touch position.IsInputDown () - Returns either true or false, depending on whether the touch component is being touched.GetDrag (world:ut.World, touchName:string):{id,x,y,speed,delta}
GetDragDelta (world:ut.World, touchName:string):Vector2
GetDragSpeed (world:ut.World, touchName:string):Vector2