Page 1 of 1

Dynamic scaling

Posted: 17 Sep 2021, 11:10
by Leizah
I got a scene made up of a Bill on path model and a cylindrical primitive shape placed on the floor.

I already set a code that shows me when the two elements collide, but I would like to set the following condition:

If Bill enters the cylinder, the cylinder radius r has to reduce of 50%.

I had problem finding a condition that allows this dynamic scaling to happen (If the cylinder radius reduces of 50% then Bill is no more inside it, so this solution doesn't work).

I also thought that I'd making two different concentrical cylinders with different values of radius and to set the logical condition that, when Bill enters the external one, only the internal one is showed.
Unfortunately, I didn't find a way to "hide" the external one when the condition triggers.
There is a way to achieve that/a different way to get the reduction that I want?

Re: Dynamic scaling

Posted: 17 Sep 2021, 12:35
by coppelia

you can hide an object by setting its visibility layer to zero, e.g.:

Code: Select all

note: you might have to use sim.setObjectInt32Parameter instead, if your version is not up-to-date.


Re: Dynamic scaling

Posted: 21 Sep 2021, 17:58
by Leizah
Thank you, it works just as I wanted!