LuukNoverraz / SumoShooters

A local multiplayer mobile game that mixes billiards with sumo. Made with the Unity Engine.
https://luuknoverraz.itch.io/sumo-shooters
2 stars 0 forks source link

Multi-touch #2

Open LuukNoverraz opened 4 years ago

LuukNoverraz commented 4 years ago

Currently using the Lean Touch asset which through an on finger down / on finger up call activates functions in the TouchInput script, which calls the movement function in the player controller if conditions are met.

The player that should be selected is picked through a ScreenPointToRay of the main camera using either the mouse or finger location. The selected player correlates to if the player touches the upper or bottom part of the screen.

As of now multi touch is not working. Instead when one player is in the on finger down phase, if another player enters the finger down phase aswell, the recipient stays on the same player. This means that if for instance one person is holding one part of the screen to shoot their character, and the other wants to do the same, but they are doing this in the same time frame as the other, that the function only works correctly for one of the players.

LuukNoverraz commented 4 years ago

Laat multitouch werken