Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Those are good ideas. Thank you very much for them! I've done a game before where a sprite always follows your mouse. It was a block breaker game where the paddle followed the horizontal movements of your mouse. It's not on here, however ^^' Making the mouse clicks work no matter where your mouse is is easy enough with a simple GetKeyDown(KeyCode.Mouse0)/GetKeyDown(KeyCode.Mouse1) and such which monitor the clicks and such. If you meant something else, sorry, i didn't understand what you meant.

(+1)

For sure! I don't think GetKeyDown(KeyCode.Mouse0) returns the position of the mouse though, you need to use something like Input.MousePosition with Camera.ScreenPointToRay and Physics.Raycast to get information from the scene. Let's you get information from the objects you click on :)

If you look for the mouse position you also wanna clamp it,