L
Lobos
Guest
There are many great tutorials for an easy camera setup (for example:
), but in these the camera follows either the obj_player or the mouse, while I need a mostly static view that is only move if the mouse is at or near one of the screen edges or a WASD buttons pressed (like in most top-down strategy games).
I have two theoretical solutions.
1.: Use a regular camera setup (like the above tutorials), than make a rectangle from view*0.1 to view*0.9 or something in both X and Y coordinates and if the mouse is NOT colliding with the rectange, than move as normal.
2.: Use 4 separate object (left, right, top, bottom) and if the mouse is collide with one of them, than move the camera in that direction.
My question is: what is the better idea (and why) or is there a much better/easier/less problematic solution?
(Please keep in mind that I am trying to do this as simple as possible).
), but in these the camera follows either the obj_player or the mouse, while I need a mostly static view that is only move if the mouse is at or near one of the screen edges or a WASD buttons pressed (like in most top-down strategy games).
I have two theoretical solutions.
1.: Use a regular camera setup (like the above tutorials), than make a rectangle from view*0.1 to view*0.9 or something in both X and Y coordinates and if the mouse is NOT colliding with the rectange, than move as normal.
2.: Use 4 separate object (left, right, top, bottom) and if the mouse is collide with one of them, than move the camera in that direction.
My question is: what is the better idea (and why) or is there a much better/easier/less problematic solution?
(Please keep in mind that I am trying to do this as simple as possible).