RefresherTowel
Member
For the life of me I cannot figure out a way to apply damping to physics particles in a top-down physics world without gravity? Is it even possible? I've tried
Result:
Result:
This is the particle creation code:
Create Event
Step Event
I've also tried setting the density and gravity scale of the physics particles, but no combinations of values in any of the functions seems to give them friction.
physics_particle_set_damping();
ranging from 0 to 100 and the higher the damping, the more likely the particles are to bounce off each other it seems? But it doesn't cause them to slow down as they move regardless of the value.
Code:
physics_particle_set_damping(1);
Code:
physics_particle_set_damping(10);
This is the particle creation code:
Create Event
Code:
global.soda_flags = phy_particle_flag_tensile | phy_particle_flag_water | phy_particle_flag_viscous;
physics_particle_set_radius(1);
physics_particle_set_damping(10); // This seems to effect how the particles interact with each other, but does not give them "damping" as I understand it
Code:
if (mouse_check_button(mb_left)) {
var dir = point_direction(mouse_x,mouse_y,x,y);
repeat(5) {
var fx = lengthdir_x(5,dir+random_range(-2,2));
var fy = lengthdir_y(5,dir+random_range(-2,2));
physics_particle_create(global.soda_flags,mouse_x+irandom_range(-30,30)+fx,mouse_y+irandom_range(-30,30)+fy,fx,fy,make_color_rgb(57,32,27),0.5,-1);
}
}
Last edited: