This is how my system was written:
grav=vak_y*((mass*bodymass)/dbp(phy_position_x,phy_position_y,earth.phy_position_x,earth.phy_position_y))
angle=point_direction(phy_position_x,phy_position_y,earth.phy_position_x,earth.phy_position_y)
if angle>angle-90 {angle=angle-90}
if angle>angle-180 {angle=angle-180}
if angle>angle-270 {angle=angle-270}
xforce=radtodeg(sin(angle))*grav
yforce=radtodeg(cos(angle))*grav
physics_apply_force(phy_position_x,phy_position_y,xforce,yforce)
and this is the script dbp
//dbp(x1,y1,x2,y2)
var localvar1, localvar2, localvar3;
localvar1=abs(argument0-argument2)
localvar2=abs(argument1-argument3)
localvar3 = sqrt((localvar1^2)+(localvar2^2))
if localvar3=0 {lockalvar3+=0.001}
return localvar3
i do not need ready code, i just need ideas how i should go about trying to count the x and y components of the gravitational force.



Find content
Not Telling

