I have a SceneCapture2D component in my level, which renders its own look of the scene and I want to project point in World space to the image space of this capture.
I’ve found a ‘Project World To Screen’ node, unfortunately it needs a Player as a Pin. I understand this is probably the most common use case, but how could I acheive the same for viewports that are not assigned to any Player? The viewport itself contains all data needed to compute this so I don’t understand the Player usage.
I’ve tried to write my own node, using this one as an example but getting needed data is heavily connected to Player instance so I couldn’t find a way to do this.
BTW: My specific case is not a typical game, there’re no Players, just a visual demo, so possible workaround would be to create some ‘dummy’ player and assign it to SceneCapture2D so they move together and I’d use this Player only for projections. Is it possible?
Hey, I don’t really know how your setup looks like and where you get a reference to the viewport, but I would suggest staying within Unreal’s framework and use a Pawn as representation of the player.
For your use case you can just use a camera that has nothing in it but a camera. The framework will automatically spawn a controller for you and you can use this to do your projection.
Yes, but I don’t want to project with a default viewport, but with my additional CameraCapture. I don’t understand why do we need to project through a Player class, not through a Viewport itself.
But the Player controller 0 owns a main viewport so can project using this one. Assuming I have a few Capture2D cameras rendering to the texture - do I project to THEIR screens using the same Player controller? I don’t think so…