Problem with TextNode

Hello everyone,

I’m having a problem putting a textnode under a 3d model. My textnode is supposed to be a “tag” on screen:

but as you can see in the image i only get 3 squares, where the 3 letters of my nodetext should appear. I think it is related to parenting the textnode to the parent, but I’ve tried using setTextureOff() to no effect.

I’m thinking now of using an equivalent method to setTextureOff but with colors, so i override the blue color on the parent model?

Thx

Does setting an override value to setTextureOff work?
e.g. setTextureOff(2)

setTextureOff(), with a non-zero override, will have exactly the effect that you describe: it will make the text look like a bunch of squares instead of like text. This is because setTextureOff() means to disable texturing, and with a non-zero override it also disables texturing on the nodes below, including the text geometry.

The easiest way to avoid this kind of problem is simply not to parent your TextNode under a node that has a setTexture() or setTextureOff() with an override. You can always avoid this. If you want your TextNode to follow the node in-game, for instance, and that node absolutely has to have a setTexture() applied to it, simply parent them both to the same node, and move around that node instead.

Or, if the node you’ve parented your TextNode has a setTexture(), make sure that you really need to apply an override (the ,1 in the last parameter to setTexture). If you don’t apply that override, it won’t affect your TextNode.

Finally, you can always bump up the override parameters on your TextNode geometry so it won’t be affected by the setTexture() or setTextureOff() from above, even if these calls above have an override. But this is a little more convoluted, and I recommend just restructuring your scene graph properly instead.

David

Thanks! I re-arranged my scene graph as you suggested, drwr.