Use 2D and 3D at the same time
in
Programming Questions
•
1 year ago
Hey all, quick question (i hope)
I have a sketch that uses P3D to render a 3D cube which can be rotated an translated. I also have a small menu with two buttons. The buttons are drawn with rect(). Now, this all goes well, untill the cube is becoming to close to the menu, than it overlaps the menu. To be more clear, here's an image:
As you can see, the cube is now over the button. For text I have the option to set textmode(SCREEN) which will render text flat on top of anything else.This is why button 2 is in front of the cube Basically I'd like the same behavior for rect. Also, at a later stage I want to double the width of the sketch and the right part should sho a 2D slice of the 3D cube. Again, I don't want the cube to overlap the slice in any case.
I have a sketch that uses P3D to render a 3D cube which can be rotated an translated. I also have a small menu with two buttons. The buttons are drawn with rect(). Now, this all goes well, untill the cube is becoming to close to the menu, than it overlaps the menu. To be more clear, here's an image:
As you can see, the cube is now over the button. For text I have the option to set textmode(SCREEN) which will render text flat on top of anything else.This is why button 2 is in front of the cube Basically I'd like the same behavior for rect. Also, at a later stage I want to double the width of the sketch and the right part should sho a 2D slice of the 3D cube. Again, I don't want the cube to overlap the slice in any case.
2