LineTrace from SceneCapture2D

I’m trying to build a widget where I display an actor using a SceneCapture2D. Actor is composed of multiple static meshes and I want to highlight them upon hovering with mouse on the widget. I feel like if I could LineTrace from the location of Scene Capture I can solve this problem but I can’t figure out how can I translate widget mouse position to the end location. Is there a math or ready function that can help me with?

I think this functions suits your needs

Hey @lordlolek, thanks for the suggestion but I don’t believe it fits to my requirements. The object is not in my viewport of my CameraActor. It’s being rendered to a widget using a SceneCapture2D.

Ah, sorry, I missed it.
In that case it seems you need to deproject mouse cursor to world but translate the mouse location from absolute viewport location to local location of SceneCapture texture.
But honestly, I hope someone else will help you, as I hate translating screen locations. I always mess the translations in more complicated UMG hierarchy then image in canvas panel :smiley:

I dont know if this helps, but I used a scene capture component for my mini map and map system. Its useful for me, as my maps are procedural, so I must get this map data on the fly. What I did, is when I open my map, player character interaction and mouse movement are disabled and controls now affect my map widget. I set up controls to scroll up down left and right similar to adding player movements, but instead edit the spring arm socket offset to move in any direction and use FOV (Perspective) or Ortho Width (Orthographic) to zoom in and out. Before rendering scene component, the spring arm offset should be set to zero, which recenters the capture component on the attached parent, in my case the player. This means when capture component renders, you have a default capture component transform. From the scene capture component, you can do a line trace using this transform to see what is under directly u der the scene capture. <this is the part i recommend for you

Did you find a solution for this since that moment ?