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: