Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!place_meeting(x,y,other)) exit;
- var g;
- g=0;
- if(id>other.id)
- {
- dir=point_direction(x,y,other.x,other.y);
- force=((lengthdir_x(1,dir)*hspeed)+(lengthdir_y(1,dir)*vspeed))*varMass;
- with(other)
- {
- dir=point_direction(x,y,other.x,other.y);
- force=((lengthdir_x(1,dir)*hspeed)+(lengthdir_y(1,dir)*vspeed))*varMass;
- motion_add(dir,-(force+other.force)/varMass);
- }
- motion_add(dir,-(force+other.force)/varMass);
- while(place_meeting(x,y,other) and g<100)
- {
- x-=lengthdir_x(1/varMass,dir);
- y-=lengthdir_y(1/varMass,dir);
- g+=1;
- with(other)
- {
- x-=lengthdir_x(1/varMass,dir);
- y-=lengthdir_y(1/varMass,dir);
- }
- }
- }
Add Comment
Please, Sign In to add comment