Download

How to project a world position to a Camera's RenderTarget2D? [Solved?]

I have a SceneCaptureComponent2D, that is looking at a position some distance away from the player and feeds that to a RenderTarget2D that is applied to a “Monitor” near the player.

On the “Monitor” I would like to draw an Icon over specific objects that the SceneCaptureComponent2D is looking at.
I tried ProjectWorldToScreen, but that appears to be specific to the Player’s view. What do I need to do to use a ProjectWorldToScreen that is specific to the SceneCaptureComponent2D?

are you allow to use line trace? you can send a line trace and the check for the UV hit

Ive completed my goal.

First I got the location of the Objected being viewed relative to the SceneCaptureComponent2D.
Then I added that relative location to the Player’s camera location, and track the resulting WorldLocation as an FVector.

Next I project WorldLocation to the screen with ProjectWorldToScreen, and convert it into a “factor of the viewport” and center it(still centered at 0,0 at this point):
ProjectedObjectCoords = ((ProjectedPosition / ViewportSize) - 0.5F);

Using “Local to Viewport Node” I get the MonitorCenter.
Next I move the ProjectedObjectCoords to the MonitorCenter:
FinalObjectPosition = (ProjectedObjectCoords * MonitorCenter) + MonitorCenter;