Dynamic Zdepth changing?

About advanced scenes, and the Thyme scripting language used in Algodoo.

Dynamic Zdepth changing?

Postby FRA32 » Wed Jan 27, 2016 5:15 pm

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 :)
FRA32
 
Posts: 213
Joined: Wed Dec 03, 2014 9:51 pm

Re: Dynamic Zdepth changing?

Postby T'wind_ » Sat Feb 06, 2016 11:48 am

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.
User avatar
T'wind_
 
Posts: 86
Joined: Wed Jul 08, 2015 5:33 pm
Location: Western Europe

Re: Dynamic Zdepth changing?

Postby phunanon » Sun Aug 13, 2017 2:20 am

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 :)
phunanon
 
Posts: 1
Joined: Sun Aug 13, 2017 2:12 am


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 1 guest

cron