Real time scaling of object

Hi, I would like to scale an object in real time depending on how far away it is from the camera. I know how to get the distance, but I don’t know how to change the scale of an object in real time? Can I do this?


Yes :slight_smile: :

obj.localScale = [fx, fy, fz]

f = factor

so [1.5, 2.0, 2.0] is
scale x with a factor of 1.5
scale y with a facotr of 2.0
scale z with a factor of 2.0

Perfect. Thank you.