Grabbing pictures from Instagram

6. Usually an average page features about 100–150 images, but you can easily thumb though all of them and find the one you’re looking for in like 10 secunds. Here’s the picture of the cat I’m looking…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Exploring Different Cameras

3D Game Programming for Kids, Second Edition — Pragmatic Programmers (78 / 200)

👈 Using a Renderer to Project What the Camera S ees | TOC | What’s Next 👉

You may have noticed that we call our camera a PerspectiveCamera. If that name seems oddly specific, that’s because other kinds of cameras exist. For the most part, we want to stick with perspective cameras in 3D coding. Let’s have a look at what a perspective camera is and compare it to another kind of camera that’s sometimes used as well.

The other kind of camera is called orthographic. To understand what an orthographic camera does, let’s add a red road that the purple fruit monster can travel on. Add the following after START CODING ON THE NEXT LINE:

Our perspective camera makes the road look something like this:

This is a rectangular road, but it doesn’t look rectangular. It looks as though it’s getting smaller the farther away it gets. The perspective camera does this for us:

If we use an orthographic camera, on the other hand, everything looks flat:

That is the same road from the previous image. We’ve just replaced the two lines that create the perspective camera with the following:

As you might imagine, the perspective camera that gives everything a three-dimensional feel is very handy in 3D games. Why would you want to use an orthographic camera?

Orthographic cameras are useful in two cases. The first is when you want to make a flat, 2D game. Using a 3D camera for a flat game just looks weird — especially at the edges of the screen. The other is when we make games with really long distances, such as space games. In fact, we can use orthographic cameras in some of the space simulations we’ll do in a little while.

👈 Using a Renderer to Project What the Camera S ees | TOC | What’s Next 👉

Add a comment

Related posts:

Aiming for Quality Assurance

To understand why the site crashed so badly, so quickly, we must take a brief look back at the three years leading up to that point. It’s rare to see such a greenfield project, for a number of good…

Silent Black Rappers

Keep the same energy when Black women come out with their stories of abuse and want your empathy. Don’t call us liars and blame us for our trauma. Write these same long think pieces when Black women…

The Risk of Freedom

There is a deep truth and tragedy to life, and I’ll spill it like this…Everything we love, all we value, all we hope to be, all we once were, all we knew and all we will ever know, will be stripped…