Download

Cast in Order to Get Data From Player Fails in Widget

Hi,

I’m trying to create a simple UI for debugging as the print text thing just does it a bunch down the side and it’s kind of an eye sore, plus with things like location being printed every tick, it’s hard to see just a single tick.

The problem I’m having is that casting fails inside the widget like on this page at the “Retrieving the Variables” section.

Here’s the blueprint for one of three things that fail the cast. To find that it failed casting I just added a simple print text node and attached it the Cast Failed arrow connector thing.

MainPlayer is a pawn with my own custom movement and input stuff added on to it. Is the fact that it’s a pawn the issue?
If I don’t bind the option then the text displays as I would expect, but I need the values to update.

If I’m not clear enough or there’s not enough information, I apologize.

Managed to fix this by swapping “Get Player Character” with “Get Player Pawn”, I realized that yeah, it was because it was a pawn and not a character, rather obvious now that I look back on it, inheritance and all that (I think :P).