Rotating a 2D PImage within a 3D P3D environment?

Hi. I’m wondering how I could get the blue square shown floating within the image to instead lay horrizontally across the center of the skybox sphere rather than vertically as it is now. Any help?

Essentially say rotateX(radians(90)); before image () command

Combining translate and rotate is a bit tricky

You might want to use noStroke(); before the sky sphere

Thanks a bunch! Would there be any way to lower the position of the image towards the bottom of the sphere? Also, where would the noStroke(); need to go? Before the background draws in void Draw() or in void Setup()?

Sure! Say translate (0,330,0); before rotate and image()

In draw() directly before you draw the sky sphere

Like this? It currently still seems to draw the lines

Ah, oh, it’s a shape!!

Did you try backgroundOB.setStroke(false); in setup ((

Or backgroundOB.noStroke(); or whatever the command is?

1 Like

Yea I used a Sphere and made it larger than what the camera shows so it shows from the inside. And I’ll give that a try!

Thanks! That worked!!

1 Like

I always wonder how a skysphere might work.

How did you make the shape for the sky sphere?

How big is it?

I created a sphere primative using PShape and set it to size 6000 (which seems to be the limit before it gets a bit glitchy) and then textured it with my skybox texture. Then I made sure that the PeasyCam I was using was within that sphere at the center (which it should defaultly be)

1 Like


I encourage you to peruse the resources available here:


Thanks a ton for your explanation!