I did test it, but your code posted here is incomplete (or is Lite-C which I currently do not use nor know much about..)...
However, my own code doesn't work properly either;
Code:
var terrain_chunk =0;
function main()
{
video_switch(8,32,1);
fps_max = 140;
level_load("FluidTest.wmb"); // load the level
wait(2); // // wait until the level is loaded
camera.x=0;
camera.y=-50;
camera.tilt=-70;
wait(-10);
ph_setgravity (vector(0, 0, -386)); // set the gravity
}
var ball_speed[3];
ENTITY* ball;
action balll
{
ball = my; // create the ball
phent_settype (ball, PH_RIGID, PH_SPHERE); // set the physics entity type
phent_setmass (ball, 3, PH_SPHERE); // and its mass
phent_setfriction (ball, 80); // set the friction
phent_setdamping (ball, 40, 40); // set the damping
phent_setelasticity (ball, 50, 20); // set the elasticity
while(1)
{
ball_speed.x = 50 * (key_cur - key_cul); // move the ball using the cursor keys
ball_speed.y = 50 * (key_cuu - key_cud); // 25 sets the x / y movement speeds
ball_speed.z = 10* (key_space-key_enter); //test
phent_addforcelocal(ball,ball_speed,nullvector);
phent_addtorqueglobal (ball, ball_speed); // add a torque (an angular force) to the ball
wait (1);
}
}
ENTITY* fluidwater;
action water
{
fluidwater = my;
my.material = mtl_water_mirror;
phent_settype(my,PH_WAVE,ph_wave);
phent_setdamping(my,1,1); // set the damping
phent_addforcelocal(my, vector(0,0,.3), nullvector);
wait(1);
}
No problems with the ball, that's working fine, however the fluid object doesn't get distorted by the ball entity. I can add a local force to make the water ripple, but not through the ball.
I think there might be something wrong here, either in my code somewhere or a bug,
Cheers