How to align text to the camera view

I want the text to align to the camera in a 3rd person camera view, no matter where the camera is looking from as long the text location is in the frame. I have tried aligning the textNode to the camera node but that doesn’t seem to work

Do I take it that you have your text attached to a node within the 3D scene? (Even if that node is just “render”.)

If so, have you tried calling one of the “doBillboard” methods (see the API starting here) from the NodePath that holds your text?

Have tried it but to no avail. I think I might have to call it in each frame maybe as it says it only rotates it once

Aah, you’re quite right–I had the wrong set of methods, sorry! ^^;

It’s not the “doBillboard” suite of methods, but rather the “setBillboard” suite of methods that you should be looking at, I believe! Again, see the API, but starting here instead.

This is the documentation for billboard effects:

https://docs.panda3d.org/1.10/python/programming/render-effects/billboard

They do what you need. You need only call them once.

1 Like

Thanks that seemed to work properly. You guys are great

2 Likes