Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

How do i script a touch input?

$
0
0
Hello everyone,

I'm currently working with an android application, but stuck with the touch inputs for the main player. I already have the movements setup, but i don't know how to convert this into touch input.

This is the player movement script:

Code (CSharp):
  1. public class PlayerMovement : MonoBehaviour {
  2.     public float moveSpeed;
  3.     public GameObject deathParticles;
  4.     private float maxSpeed = 5f;
  5.  
  6.     private Vector3 input;
  7.  
  8.     private Vector3 spawn;
  9.  
  10.     // Use this for...
How do i script a touch input?

Viewing all articles
Browse latest Browse all 1466670

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>