3D Interactive Text

Hi-

I’m trying to create a game that lets you interact with 3D text. The idea is that all text in the game are objects that you can jump onto and push. When you press a button, the text changes fonts, size, and spacing. So far, I have not figured out a good way to do this besides create a lot of models in maya.

I have a few questions:

1- how do you change text with code?
2- can 3D text have thickness?
3- can text have collision detection?

Many thanks!

The easiest method would be to have the text as Game Objects. All of my answers relate to using these Game Objects.

1 - You cannot directly change text with code. However, you can create copies of the letters in different fonts. When the player changes the “font,” switch letters out with “Instantiate()” and “Destroy().”

Another option to changing “font” would be to have all of the text in all fonts pre-loaded into the scene. Changing the position of the text would switch the font without ever using “Instantiate()” or “Destroy().”

2 - Since the text is a 3D object, of course! Just make sure, when modeling the text, to give it the depth that you want. How to actually model the text, though, is something I do not know how to do…

3 - Yes! Just be sure you have an appropriate collider attached to your text objects. A mesh collider is the most accurate, but should not be used in this case, since the text will move. I would use a compound collider. Go here to get an idea of how to make one.

@xinsq

Have you tried VText? You can change the font type, the content of the text at runtime.


VText for Unity allows you to bend, extrude, change the quality of the meshes and even bend it at runtime. You can find VText in the AssetStore (Unity Asset Store - The Best Assets for Game Making) . For more information have a look at the Website from Virtence (http://www.virtence.com/en/software/unity-packages/vtext/).