Hi,
I have a ball and plane inside a hollow box. I made the ball a physics entity. The ball drops from it's initial positon on to the plane. The roll and tilt of the plane is controlled by mouse movements.
The physics works except when the ball lands and stops moving while the plane has 0 tilt and 0 roll. In other words the mouse is not moved until the ball goes to a complete stop. Afterwards, the ball refuses to react with the roll and tilt of the plane. Do you have any suggestions how to make the ball roll around the plane when it is completely stopped?
Code:
action ball_control()
{
phent_settype(my,PH_RIGID,PH_SPHERE);
phent_setmass(my,10.0,PH_SPHERE);
phent_setfriction(my,10.0);
while (1)
{
//more code here
wait(1);
}
}
action plane_control()
{
while(1)
{
my.roll += mouse_force.x;
my.tilt += mouse_force.y;
wait(1);
}
}