if you have a physics engine you may try rhis one
this will work only with one sphere and one obj attached to it
entity* sphere;
var gravity_ang[3];
var temp_gravity[3];
var gravity_force=300;//try changing this
function link_to_sphere()//the link function
{
vec_set(temp,sphere.x);
vec_sub(temp,my.x);
vec_to_angle(gravity_ang.pan,temp); // set gravity angle to the center of the sphere
vec_set(temp_gravity,nullvector);
temp_gravity.x=gravity_force;
vec_rotate(temp_gravity,gravity_ang);
vec_inverse(temp_gravity);
ph_setgravity(temp_gravity);
}
action g_sphere
{
sphere=my;
}
action boat
{
phent_settype( my,PH_RIGID, PH_BOX);
phent_setmass ( my, 100,PH_BOX);
phent_setdamping(my,100,100);
phent_setfriction(my,40);//play with this values
while(1)
{
link_to_sphere();
wait(1);
}
}
i haven't tryed this code so maybe there are errors in it
2 Josiah

nice demo, can you show the script?that code is just what i looked for!