- Home /
Topdown Shooter
2 questions I have the camera setup and have the crosshair but the problem is it follows my mouse where ever it goes..
How can I make it so it can only go around my character in a 360 radius without it flying all over the screen the reason I am asking this is because When I shoot It shoots where my player is facing instead of the where the crosshair gui is.
this is the crosshair script
var position : Rect; var crosshairTexture : Texture2D;
function OnGUI () {
position = Rect( Input.mousePosition.x - (crosshairTexture.width / 2), (Screen.height - Input.mousePosition.y) - (crosshairTexture.height / 2), crosshairTexture.width , crosshairTexture.height );
GUI.DrawTexture( position , crosshairTexture );
}
Comment
Your answer
Follow this Question
Related Questions
Deadfrontier type crosshair 1 Answer
How do you make a movement and mouse look for a top down shooter? 0 Answers
topdown shooter unity 2 Answers
Camera Setup for Top Down Shooters 3 Answers