My quick implementation of a thermal / X-Ray vision for my upcoming sniper class! I hope you enjoy it.
https://dev.epicgames.com/community/learning/tutorials/BbxO/add-thermal-vision-to-lyra-starter-game
looks good
Hi, it’s the same technique for security cameras, there are many tutorials on YT, search for scope with render target. I trust these will be of great help:
Make a Dual Rendered Scope - Fast and Simple! (youtube.com)](https://www.youtube.com/watch?v=wxr7a7Rphws)
https://youtu.be/uuXZS--Iusk?feature=shared
Lyra is different. Do you have a group on Discord?
I have an FPS mode, what I do is create a camera in my right hand and activate it when I am aiming. I can do something similar, right? I only have to maximize the focus if it is a sniper and that sniper kills with a single shot.
I plan to put everything in B_Hero_ShooterMannequin, or is there a better place?
Correct, in my implementation back in the day, I wanted to make it fast and simple, so I added the render target material to the HUD and controlled its widget from GA_ADS (add to viewport, remove from parent) + first person camera logic (with scene component inside Hero Shooter), I have a video on this one. However, the “realistic” implementation is placing the render target material in the weapon’s scope and moving the weapon towards the FPS camera using procedural Hand IK. If you’re planning to build an FPS game, it’s a good idea to check this feature first.
Just as a remark, it’s good for a single player, but in my early test it was performance heavy for networked games, that may be the reason I haven’t seen this feature in a AAA games so far.
What do you think if I use the HUD directly? That is, it constantly keeps reading the data of the variables that I send from B_Hero_ShooterMannequin. For example, if sniper mode is active indicated from the B_Hero_ShooterMannequin, the camera is changed to one with a higher zoom and a sniper scope is added to the HUD.
I want to know if as a quick solution it can be optimal.
Btw, can you give me any tips to make the gun appear in the center? Because in my case it looks a little to the left, not in the center.
Event tick can be heavy on performance if your game is already running on a budget. Try to use GA_ADS to toggle on/off without the need of event tick. There are many ways to implement this feature. You can also add this scope image to the weapon’s reticule and keep it hidden. So, send a message from the GA_ADS ability to unhide/hide on demand. Or you can keep the scope’s widget a separated widget class to be called "add to view port / remove from parent on demand. But in all cases, controlling this logic inside GA_ADS will give you better control. For networked games, you can alternatively add the widget logic to your player controller (or a controller component), so only local players will see the widget on the HUD.
You need procedural hand IK for Aiming Down the Sights with First Person Camera. GameDevRaw has a comprehensive YT FPS series that can give you a good start. You have to by-pass the native Lyra Hand IK logic otherwise running both systems will give you unpredictable results. See video #9 of his series: