I am making a game where objects are represented by colored cubes. I have files that mark the location and rotation of the cubes. I've been using Processing's 3D library and the cubes disappear within a certain distance, like this:

enter image description here

Why is this happening?

  • 3
    \$\begingroup\$ Many rendering engines have a maximum draw distance. You might want to check out how to increase Processing's draw distance. \$\endgroup\$ – MichaelHouse Nov 10 '13 at 3:05

Try using the perspective() command to set a greater far drawing distance.

| improve this answer | |
  • \$\begingroup\$ I don't get how to use perspective. There is no difference between p.perspective((float)3.14/12, 1900/1000, (float)d.posZ*900, (float)d.posZ*1000F); and p.perspective((float)3.14/12, 1900/1000, (float)d.posZ/900, (float)d.posZ*1000F); What am I doing wrong? \$\endgroup\$ – user38863 Nov 10 '13 at 3:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.