Page 1 of 1

Dynamic Zdepth changing?

PostPosted: Wed Jan 27, 2016 5:15 pm
by FRA32
I need some objects to steadily change their ZDepth depending on their depth in 3rd dimension. As most of us know, zdepth does not really update when you change it, so I need another way of properly rendering circles that bounce around in third dimension(if one is far in the background, and another is far in the foreground, the far one could be rendered in front of the close one). I need it so I can complete my 3D version of DigitalSoundwave's Algonoid scene, where the ball(s) can get behind the bricks or even behind other balls if there are multiple.

Any help and tip's would be very appreciated :)

Re: Dynamic Zdepth changing?

PostPosted: Sat Feb 06, 2016 11:48 am
by T'wind_
there may be a better way to do it, but this will work.
Clone the circle several times and give them different zDepth. Glue them together. Use a script to make the circle invisible when z-position < zDepth.
It's fake dynamic Zdepth changing.

Re: Dynamic Zdepth changing?

PostPosted: Sun Aug 13, 2017 2:20 am
by phunanon
A huge necropost, but just in case anybody in the future wonders how to achieve:
Try using
Code: Select all
zDepth = new; scene.cloneEntityTo(entity, pos); timeToLive = 0;
to clone the object with a new zDepth :)