I’ve encountered some mighty strange things about Panda’s positioning systems with both render2d and when coloring lights.
For example, say I want to place an image onscreen at X64 and Y12. If I enter that into the function, that’s not where it appears. Why?
Also, when coloring lights the default number for full white is 1. Not 256, 1. How on earth am I supposed to color lights with the normal RGB values if 1 = full white? Can someone please tell me why the system works this way?
The “render2d” node is set up in such a way that its child nodes will have positions in range (-1,1). This is usually a good thing as you have aspect and resolution independent positions.
However, if you want to position your nodes in “pixels”, there’s another node named “pixel2d” which is set up accordingly.
That’s actually not uncommon. The Blender API does it that way and I’m sure many others.
Note that it’s not 1, but 1.0. So you can have numbers like 0.5555.
If you have integers, it’s as simple as dividing your number with 255.0, to get a float number in the range (0.0, 1.0) which Panda wants.
Ah, ok! Thanks preusser! That explains and helps a lot! I’ll look into pixel2d.