Hi, I'm using the following script, but when my character pushes the box, it skitters and stutters unpleasantly. Any ideas how to make this slide more smoothly?
Code:
action pushable_box
{
while (player == null) {wait (1);}
var my_angle;
while (1)
{
// play with 50 - it depends on the size of the box
if (vec_dist (player.x, my.x) < 50)
{
vec_set(temp.x, player.x);
vec_sub(temp.x, my.x);
vec_to_angle(my_angle.pan, temp.x);
temp.x = -10 * cos(my_angle.pan - my.pan) * time;
temp.y = -10 * sin(my_angle.pan - my.pan) * time;
temp.z = -1 * time;
c_move (my, temp.x, nullvector, ignore_you | ignore_passable | glide);
}
wait (1);
}
}