I have a question regarding the User Interface.
I want to display the current settings of the player-pawn camera on the UI widget and somehow cant figure out how to get the variable like focal length linked in the UI widget blueprint.
Can someone please help me out?
Hi there!
Thats, great. Would you mind giving me a solution for a camera setting being updated in viewport widget in game mode? I’ve set a keyboard button to make the camera cycle between different focal lenght values. I just need to show the current focal lenght in the viewport.
Thank you!
The widget is created in the Game Mode?
This is the graph for the widget. Zoom is a text block set to Variable.
That’s where the lens focal lenght should appear.
Sorry about the mess. I just don’t know how to trigger / connect the UpdateZoom event.
This is the code for Cycle the lenses, also inside my Pawn event graph.
I guess I’ve messed things up watching different tutorials, and trying to make it work.
Right now, the widget only shows initial focal length, obviously, because I can’t connect the updated focal length value to the UpdateZoom node.
It worked! God, I really need to get into blueprints.
It worked just fine, by connecting both ends of the Cycle Lens code to SetText function, like you said.
I’m not sure if I could clean up the code and make it better, but anyway.
Thank you so much for your time. Sorry about the newbie question.
Cheers!