Move a video Z coordinate. change its depth

Hi. I saw ofVideoPlayer objects can be placed just in x and y coordinates but not z, and I need to change its z position. I thought A solution would be bind the video to a plane but I couldn’t.

I created an ofPlanePrimitive and gave it size and position, then I did:

video.bind();
plane.draw();
video.unbind();

But then running the program the plane looks all black

Thank you.

You can try ofTranslate(0,0,Z);

Hi @Ezequiel_Leon_Zybert ,

The 3DPrimitivesExample has video (an ofVideoGrabber) and various primitives. Maybe try the following when you set up the ofPlanePrimitive, but after you’ve set up the video player (so its loaded and has an ofTexture):

plane.mapTexcoordsFromTexture(video.getTexture());

Also don’t forget to update the video player in ofApp::update():

video.update();

thanks for your help. I’ll try what you told me