Quantcast
Channel: Questions in topic: "endless"
Viewing all articles
Browse latest Browse all 123

Game Object moved by mouse x,y input is limited to screen resolution. How to bypass for endless moving?

$
0
0

function Update () {

transform.position.x = (Input.mousePosition.x*0.05);
transform.position.z = (Input.mousePosition.y*0.05);
}

With his code I can move my object around but its constrained by the edges of the screen. How can I bypass these edges so i can move endlessly in any direction?

The reason why I'm using this kind of navigation is because I have made a device with a big ball, if you spin this ball in a certain direction a sphere in game will roll in the same direction.

Thanks in advance


Viewing all articles
Browse latest Browse all 123

Trending Articles



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