Then I want to attach a text to a sprite I have created and I did not succeed. I try using a TextNode. If I attach it to aspect2d or render2d it is ok. But if I attach it to another node I create to manage my sprites I did not see anything.
Hi, I dunno for sure that this is your whole problem, but…
this line
self.textNodePath.setScale(0.1)
is probably causing you problems. If I’m correct the sprite code is represented in screen pixels, which means that your text is approx a tenth of a pixel high, soo… Try making it like ten pixels high and see if it works.
(aka np.setScale(10), instead of np.setScale(0.1), this should make it work, or at least it’s a problem I saw)
If you still have problems I’ll try and fix the code, sorry about only giving you one hint
so my problem seems to be my text node is not looking to the camera. so how I can rotate. simply rotate around the good axes ? can I set it to be both sided ? Because I have tried with setR/setH/setP and I did not succeed …
@drwr thanks again … but none of your solution seems to work. what you have proposed seems logicial but I did not understand what I missed but even if I still be able to see the bounding sphere I cannot see the text it self
Well, perhaps there is some other reason you can’t see the text. You’re doing some funny things there with transparency, texture, and alpha scale–what happens if you parent your text node directly to render and avoid all those funny tricks?
I did not think … I will clean my project to make it simple so I can post it here if you have some time to take a look … and try to find a solution before.