Quantcast
Channel: Answers for "Firing at mouse position, 2d game"
Browsing all 4 articles
Browse latest View live

Answer by LyanApps

Are you moving the camera position as well? You can use Input.mousePosition to get the location of your mouse on each frame....

View Article


Answer by BDP1

Thank YOU! This code works perfectly!! function Update () { var mousePos = Input.mousePosition; mousePos.z = 32; //The distance from the camera to the player object var lookPos : Vector3 =...

View Article


Answer by LyanApps

Are you moving the camera position as well? You can use Input.mousePosition to get the location of your mouse on each frame....

View Article

Answer by BDP1

Thank YOU! This code works perfectly!! function Update () { var mousePos = Input.mousePosition; mousePos.z = 32; //The distance from the camera to the player object var lookPos : Vector3 =...

View Article
Browsing all 4 articles
Browse latest View live


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