This simple code works for me:
Code:
var ball_speed[3];
function ball_hit()
{
if(event_type == event_block)
{
vec_to_angle(my.pan, bounce);
}
}
action bouncingBall
{
my.enable_block = on;
my.event = ball_hit;
while(1)
{
ball_speed.x = key_1 * 25 * time_step;
ball_speed.y = key_2 * 25 * time_step;
ball_speed.z = key_3 * 25 * time_step;
c_move(my, ball_speed, nullvector, glide);
wait(1);
}
}