How can i check if my character is inside my camera view or not ? so that i can move/rotate camera before its about to get out of its view? i only want to rotate camera if “character” is about to go out of view. not after it gets out of view?
Any clue would be very helpful. cuz i have no idea how can i do that…
I tried attaching a box on the left and the right side of camera to get event overlap to rotate camera. but its not working as i wanted… its been two days and i am stuck… please help!!
No one answers because the answer is too simple and only requires math education.
Get the rotation vector and rotate if the vectors mins/maxs are out of the desired bounds.
With blueprints its simply use the (Not Equal) node:
Here is my full blueprint which tells you if an actor is out of the camera’s bounds:
Also you have to use the Set Control Rotation node to set the rotation or your character won’t move? But it depends on your setup!
one question though… how would i know that my player is going out of the camera view toward the left or the right? its giving false on both side right now i dont know which direction to rotate my camera because of that?
You don’t have to know which direction: left or right. You have to know the rotation. And you know it, just rotate your camera using the output rotator, the one calculated from the 2 points.
yup worked! i thought i’ll have to rotate camera manually by some degree… but now its much easier after doing what you said.
thanks again for your clean and clear replies