Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

I can't use unity Remote 5 so can you check if this would work on a phone?

$
0
0
Here is the code I want to try but can't: if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Moved) { Vector2 touchDeltaPosition = Input.GetTouch(0).deltaPosition; rb.AddForce(new Vector3(-touchDeltaPosition.x * Speed * Time.deltaTime, 0, -touchDeltaPosition.y * Speed * Time.deltaTime)); } So would this work on a smartphone to push the rigid body in the direction that you swiped to?

Viewing all articles
Browse latest Browse all 4709

Trending Articles



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