Quantcast
Channel: Latest Questions by neogrant2
Viewing all articles
Browse latest Browse all 8

Touch to turn wheelcolllider.steerAngle with limits

$
0
0
So I'm pretty stumped on how to get this totally perfect for the iPhone. Obviously with a keyboard you can just do FrontWheel.steerAngle = value * Input.GetAxis("Horizontal"); However I'm trying to work out how I can apply the same logic with touch. My touchright button is a guitexture, and works fine as below. for (var touch: Touch in Input.touches) { // Turn Right if(touch.phase == TouchPhase.Stationary && turnRightButton.HitTest (touch.position)){ TouchRightCount= 1; } else if(touch.phase == TouchPhase.Ended && turnRightButton.HitTest){ TouchRightCount= 0; } } What would I need to do in order to get the same results as desktop onto iphone? Help appreciated!

Viewing all articles
Browse latest Browse all 8

Trending Articles



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