How to create a textbox in UPBGE 0.3

Howdy, I’m new and can’t use a lot of images in this tutorial, so bear with me!

A little while back I was trying to make a scrolling text object in UPBGE
I ended up figuring out this super simple method:

1. Create the following geometry node setup on any object

Slice String → String to Curves → Fill Curve → Group Output
Set the string value in the slice string node to whatever you want your text to say.
Ensure that the length of the string is as long as your text.

2. Keyframe the String Length

Press the I key while hovering the mouse over the Length box in the slice string node to make a keyframe

From here you can determine how long you want the animation to be.
Make sure when choosing the length, that it is a multiple of your string length, otherwise it will be inconsistent.

In this case I would set two keyframes at value 0 and 110 on the timeline, to have 10 frames between letters.

3. Logic Bricks

Always → And → Action
Set the action to your animation, and the frames to the values of your starting and ending keyframes.

The animation created will be named Geometry NodesAction, the number will vary depending on how many geometry node actions you have, so just keep track of your order.

And that’s it, I’m not sure if this is the most efficient way of achieving this, but its the easiest method I could think of,

Hope this helps :slight_smile: