I’ve been messing around with Text objects in the Game Engine only to realize that 99% of text features are not supported in the GE. I still have questions.
Is there a pythonic way to access text “properties” other then “KX_FontObject.text” and “KX_FontObject.resolution” ?
The reason why I ask is that KX_FontObject.resolution seems not documented. Nevertheless it’s there…
Why does my Text object deforms a little when entering preview mode §? Typically, it slightly changes its shape and moves a little bit to the right.
from bge import logic
def some():
scene = logic.getCurrentScene()
for textobj in scene.objects:
if "Text" in textobj:
textobj.resolution = 12.0
some times I doing it like the example by getting an “text” object by the property “Text”
by getting an “text” object you can directly set the resolution. (.resolution = n)
for you second question:
“The textures for text objects are generated at scene start. Unfortunately they do not match what you see in the preview window.”
from this post: (click)
Thank you the_cannibal xD, but I was looking for other properties than “Text” and “resolution”.
These are actually the only ones I already know about, but since “resolution” is not documented I thought maybe others exist…
for you second question:
“The textures for text objects are generated at scene start. Unfortunately they do not match what you see in the preview window.”
from this post: (click)
I see.
Unfortunately I get visible differences even with single characters.