Render mesh beyond maxZ?


I know that you can set maximum visibility to camera by setting maxZ property.
Is it possible to have a single mesh rendered beyond that? Lets say I have a mesh very far, the sun for an example, that should be always visible.

Thank you


As far as I am aware, the maxZ is really as far as your camera goes in terms of the Z axis. It does not render anything beyond that. Why not simply use a big maxZ to include the sun? What would be the issue here? If rendering more than needed is the problem, you could simply implement some culling behavior yourself.

It is also possible to use Skybox for this purpose, I suppose.

I tried to set maxz to insanely large, but after that scene.pick() method did not return picked coordinates anymore. Scene.pick() fails because there is divicion with zero in matrix operations which happen during creation of picking ray

You can set the sun either with infiniteDistance = true or just use another scene to render it