使用此函数,可以在物理模拟中设置粒子的半径(以像素为单位)。此函数在范围内为全局,因为它不仅会更改更改后创建的新粒子的半径,还会更改模拟中已存在的粒子的半径。
physics_particle_set_radius(radius)
参数 | 类型 | 描述 |
---|---|---|
radius | Real | 粒子装置的半径(以像素为单位)。 |
N/A
physics_particle_set_radius(15);
physics_particle_set_density(0.5);
physics_particle_set_damping(1);
physics_particle_set_gravity_scale(1);
以上代码将为模拟中的所有粒子设置基本属性。