How does the coordinate/unit system work?

How does the coordinate/unit system work?

For instance:

environ = loader.loadModel("../models/boxR")
environ.reparentTo(camera)
environ.setScale(0.25,0.25,0.25)
environ.setPos(0,10,0)

Sticks my box in the middle of the screen at depth 10. If I say setPos(2,10,0) it moves right drastically. What units are being used?

So, say I have an 800x600px window and I want my object to appear at 200x300 measured from the bottom left. How would I tell panda to do that?

Your units are whatever they want them to be. But they’re 3-D, not 2-D: they involve a space in front of your camera, and have nothing to do with pixels.

Suppose you decide your units are inches. Imagine holding a box 10 inches in front of your eyes. Now move that box 2 inches to the right. It moves pretty far in your field of view, doesn’t it?

Suppose, on the other hand, your units are miles. Imagine a tower 10 miles ahead of you. Now move that tower 2 miles to the right. It moves pretty far in your field of view, doesn’t it? As a matter of fact, it moves exactly as far as the box in the first example did. So as far as Panda is concerned, it doesn’t care whether you call your units inches or miles or anything in between.

If you want to deal with pixels, you should maybe consider a 2-d engine instead of a 3-d engine. If you’re just talking about a 2-d component of your game, you want to be attaching it to render2d, which is designed for 2-d components, and has a scale in the range -1 to 1 vertically, and (roughly) -1.33 to 1.33 horizontally.

David