0
\$\begingroup\$

I've searched everywhere and can't really find a good answer... Even with my near clipping plane set to 0.01 the objects are clipping too close.

Camera Screenshot

Tried to get a view where you can see it clipping a little... This camera is supposed to go into this tube, but if i put the camera into the tube, the sides of the cube clip away. I lowered the near clipping plane as much as it lets me, but it's not enough. Only thing i can think of is increasing the size of everything, which would be a pain to work with...

Someone else suggested overlaying a second camera and having a giant tube elsewhere in the scene, but this seems inefficient as it means i would need to have 2 people, 2 cameras, 2 tubes, and everything that happens to one would have to happen to the other...

Thanks in advance.

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

The engine is not designed for scenarios like putting the rendering camera inside an endoscopy tube that is probably less than an inch in diameter. For one thing, the engine relies primarily on single-precision 32-bit floats, so you'd start to get jitter and other issues caused by floating-point precision error with a camera confined into such a tiny space.

Your best bet is indeed increasing the size of everything in the scene. This should not make the scene "a pain to work with"; in fact, it should be easier to work with, because you won't be fighting with the Editor trying to do things at a scale that it isn't designed for.

Rather than manually increasing the size of each object in the scene, you can scale the whole scene at once in the Editor like this:

  1. Create an empty GameObject at world position (0,0,0) (let's call it the "container")
  2. In the Hierarchy panel, move everything in the scene into that container
  3. Increase the scale of the container.
  4. If needed, you can then move everything out of the container, and it will keep the size and position that it had inside the container.

Unity assets are normally authored at a scale where 1 Unity unit = 1 meter. If you need to measure things precisely, it's best to increase the scale by 10 (so 1 unit = 10cm) or 100 (so 1 unit = 1cm).

Once you've scaled up your scene, you can simply zoom out the camera in the Scene view (using the mouse wheel) to make it easier to move around. Also keep in mind that you can double-click on any object in the Hierarchy panel to automatically focus the camera on that object; this will zoom the camera in or out as needed to account for the size of the object.

\$\endgroup\$
3
  • \$\begingroup\$ Oh, i don't know why i didn't think of that, i was thinking i would have to rescale every single object in the scene. Thank you, that's a much better solution than having a second overlay camera like the other guy suggested lol \$\endgroup\$
    – Mashimaro7
    Mar 23 at 0:45
  • \$\begingroup\$ @Mashimaro7 Glad to help. I just updated my answer with a few other tips. \$\endgroup\$
    – Kevin
    Mar 23 at 0:48
  • \$\begingroup\$ Thanks, just goes to show I was overthinking 4 years game design experience and i still overthink such a simple problem haha \$\endgroup\$
    – Mashimaro7
    Mar 23 at 1:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .