How to change the properties of Particles2D System from script ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Scavex

I want to change the tangential acceleration of particles from the script like this :

if Input.is_action_pressed("move_left"):
    $Particles2D.tangential_accel = 50

But this gives me error ! How can I change the tangential acceleration as well as other properties ?

:bust_in_silhouette: Reply From: jgodfrey

tangential_accel is a property of the contained process_material, not the Particles2D itself.

So, you want something like this:

$Particles2D.process_material.tangential_accel = 50

Thanks mate it worked just fine !

Scavex | 2020-09-03 16:25