- Home /
Point-and-Click Camera movement script
I need a Point-and-Click Camera movement script. like when mouse get to screen edges the camera will rotate to that direction.
Hey @ StelBlotOfficial_$$anonymous$$er, how do you propose to do this ? have you attempted a script or are you simply asking- "Can somebody make me a script that will..."
$$anonymous$$y advice, would be to try this out or have a look on , well... Here first before asking the question as a pint and click mouse movement script will have, likely, already been attempted on here. once you have started such a thing, then return here and we can go forward. At this stage, you are NOT asking for help on something you have attempted and failed, but rather asking for a job to be carried out on your behalf with little or NO discernible effort from your end, as of yet. Cheers bud, hope this clarifies some things about how to start using the site and some decorum to go with it :)
Here is an answered link to a post on this site about (or near as we could possibly know) camera movement using touch controls. I have provided this link to emphasis the completely undefined needs of your script to handle the camera. Things like... Is it orthographic, perspective based, or predo$$anonymous$$antly 2D with perspective (like 2.5D) Do you want to click to an area on the screen and have the camera turn and face which way? Do you want the mouse to get to edge of screen and camera to face the mouse where ever it is on screen OR do you wish it to translate and face the mouse? Can you see how high level you original question may come over slightly lacking? Have a look about the place and come back after that maybe :) Cheers bud, hope this start the journey correctly for you :)
Answer by elmidiachi · May 13, 2018 at 02:49 PM
You can use Input.Mouseposition to check where the mouse is. Make Sure you lock the mouse to the screen so you have 0,0 as the leftbottom And screenwidh/ height for righttop of the screen. You can use this position to rotate the camera by using Rotate() on the used camera.