Don't Walk By - 2

Don't Walk By - 2

Jan 30, 2020. | By: Evan Diamond
1 min

The second CGD blog post about Don’t Walk By

Overview

For the first week I added the touch manager script I used in a previous game jam.

Touch Manager

The touch manager script is a wrapper around Unity’s touch api with functions which users can call to determine if a gameobject is being touched or not. It also spoofs the mouse as a touch so anything a user develops using the mouse will work for a touch screen. There were some adjustments need to be made to the script however. The game jam game the script was used in had no UI elements to the touch manager needed to be able to detect both non-ui and ui gameobjects. The script works by firing a raycast from the touch postion downwards an detecting the first gameobject it hits. So for UI I implemented the same method but using the Unity Event System raycast that only picks up on UI and doesn’t require a colliders on the UI gameobjects to do so.

About

Gamers developing new games.

Social Links

Our Bunker

University of the West of England,
Frenchay Campus, Bristol, BS16 1QY,
United Kingdom.