function movement{
temp.x = my.x + fcos(my.pan,1000);
temp.y = my.y + fsin(my.pan,1000);
temp.z = my.z;
if key_c == 1{phent_addforceglobal(my,temp.x,my.x);}
}
action usercontrol{
ph_setgravity (vector(0, 0, -500));
phent_settype (my, PH_RIGID, PH_BOX);
phent_setmass (my, 3, PH_BOX);
phent_setfriction (my, 10);
phent_setdamping (my, 0, 0);
phent_setelasticity (my, 50, 20);
player = my;
while(1){
cam();
movement();
wait(1);
}
}