Centring Print String text?

Hi there,

is there a way to centre debug text using the print screen node.

It’s really affecting my eyes lol!

Centre? As in the centre of the screen? Wouldn’t that drive one insane in under a minute?


Not really afaik but you can also use this:

image

If you plug in a Test Base Actor, the Text Location becomes a local offset instead of the world location it is by default.

1 Like

Ok forgive my very little understanding of the DrawDebugString node and test base actors.

by using DrawDebugString is the text location automatically set to the location on the node or do I have to connect to that specific input?

What is the test base actor and how do I add this?

Apologies for being a pain

Not sure if that’s what you need but it’s another way of displaying debug info. Rather than having it spam a wall of text in the upper left corner, you can have it attached to a world location. Here I’m showing some info about the drivable pawn:

…which results in:

It might be a tad easier to follow than messages in the output log or print text / string. if you do not plug in the test base actor, the Text Location will be World Location. In the example above, the location of the text is car’s location + Z offset in the Select node.

This is really situational and whether using it makes sense depends on what needs showing and what’s the context. If you’re serious about debugging, you write your own custom debugger with widgets, pipe in generic data and the widgets handle formatting & display. It would also give you the chance to add some functionality at this point. Tools like that are handy and the upfront cost of creating one is totally worth it!

1 Like

And since we’re on the topic, there’s also the venerable HUD class that can do all kind of funky things no one else can:

It can draw text in screen space, lines, rectangles and so on… If you combine it with world projection nodes:

You can rapidly build a neat tool that shows what’s needed. It’s a framework class, it’s accessible from (almost) anywhere so you can talk to it with a BP Interface dedicated to showing debug info.

1 Like

Ah Cool!

Thanks for that very much appreciated!

Can you show me how you got the test base actor as I can’t seem to get one in my level bp?

You can do it inside the actor.

But if you need to reference something in the LB, select an actor in the viewport or outliner and right click in the Level Blueprint graph. You’ll have an option to create a reference.

Ok thanks for that