Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Macryc |
HI All, I need some ideas. I have a RTS type setting featuring the character node with a high-angle camera looking at it. I can move and rotate the camera independent of the character to survey the map in its vicinity (using WASD and mouse). I want to stop the camera from moving too far away from the character node (to prevent the player from flying over the whole map without the character even going anywhere).
I tried to do this using distance_to
(with a cam movement speed variable being set to 0 once a certain distance is reached) which does stop the camera movement but also prevents me from WASD-ing back to the character because the max distance condition is still met and cam movement speed is still 0.
Perhaps someone can think of a better approach?