What am I doing wrong here:
http://davidditch.com/Boat/docksimulator/physicstest.zipUse arrow keys. If you hit arrow to the left, it will hit the right column and bounce back harder than it hits. I"ve played with elasticity but I'm at a loss.
Here is my behaviour
action block_move
{
my.fat = on; // the first 3 lines of code
my.narrow = on; // enable the new
c_setminmax(my); // collision detection system used by A6.2 or newer versions
var boat_thrust = 0;
phent_settype( my, PH_RIGID, PH_SPHERE);
phent_setmass(my,1,PH_SPHERE);
phent_setelasticity(my,0,0);
phent_setfriction(my,10);
phent_setdamping(my,1,1);
while (1)
{
if ((key_cuu == on)||(joy_1 == on)) // press and hold the "Left" arrow key to move the car
{
boat_thrust = 1;
phent_addforcelocal(my,vector(200,0,0),vector(0,0,0));
}
if ((key_cud == on)||(joy_2 == on)) // press and hold the "Left" arrow key to move the car
{
boat_thrust = 1;
phent_addforcelocal(my,vector(-200,0,0),vector(0,0,0));
}
if ((key_cul == on)||(joy_force.x > 1)) // press and hold the "Left" arrow key to move the car
{
boat_thrust = 1;
phent_addforcelocal(my,vector(0,-100,0),vector(-70,0,0));
}
if ((key_cur == on)||(joy_force.x < -(1) )) // press and hold the "Left" arrow key to move the car
{
boat_thrust = 1;
phent_addforcelocal(my,vector(0,100,0),vector(-70,0,0));
}
wait(1);
}
}