Download

In-game screen and zooming

Hello :smiley:

I have some “In-game” screens in my project and i want to zoom-in the player from each positions into the center of the screens.

Like in this video at 5:00 minutes

https://youtube.com/watch?v=s2lYdyLRmzI

If the player press the E key he zoomed in and if he quit the in-game screen the action reversed.

The next question :rolleyes:

The player can use some cameras in the world to look around and zoom in/out. if the player scans the environment and zoom close enough to a target, should he find invisible objects or quests. But only when he zoomed the camera at the correct position. How could i realise this?

Sorry for my terrible english and thanks :slight_smile:

In Alien: Isolation, when they zoom into the computer screen like that, it pretty much locks the camera to the center of the in-game monitor (and if I remember correctly, you can slightly move your camera to the left or right to peek around the edges of the monitor, which can be done via angle clamps).

There are a few ways you can achieve the lock-in zoom effect. You could do a line trace, which is activated by pressing “E” (or whatever key/button you wish), and OnHit of the monitor, it will pull the player’s camera in to the screen. To get the actual motion of your player moving towards the monitor, you can create a timeline with a float track and output the Update pin to “Set Actor Location” to smoothly move your character there. If you want the “peeking” effect around the monitor’s edges, limit its ability to look around via an angle clamp (you’ll have to play with different angles to find the perfect angles to limit).

Another method is instead of a line trace, you could put collision capsules/boxes around your monitors and when the player walks into that capsule (Create an OnComponentBeginOverlap on the capsule), you can have a prompt appear to press “E” and then output to a timeline as stated above. If you go this route, you may need a “gate” node to ensure the player is actually inside the capsule before being able to press “E”.

To exit the action (or reverse it), just drag a pin to the “Reverse” pin on the timeline you created.

Regarding your second question, I have no experience with that, but it sounds like a depth of field type of thing. Maybe someone else can give you insight on a method for that (or try to find some DoF-related tutorials/explanations). I guess you could sort of hack it by a branch node (If node) that checks if the player is on a camera; if true, is the player zoomed in? If true, do a line trace or something to ensure they’re looking at the object and then perform a custom event that will trigger that object to highlight or whatever.

Hope this helps and good luck! :smiley:

thanks for your answer… i will check it :smiley:

This works perfect :smiley:

But i could not add “Line Trace” to my Usable Camera Actor, like i did in my character Blueprint.

Any Ideas?