Posted By: Toon
c_move friction problem with ball and platform - 06/11/09 15:38
Is it possible to move a ball over a platfrom in a smooth way? The ball has gravity applyed.
I tryed the code below but it does not run smoothly. It looks like there is a problem with friction between the two models.
Here is my script;
I tryed the code below but it does not run smoothly. It looks like there is a problem with friction between the two models.
Here is my script;
Code:
action ball { var ball_move[3]; var ball_gravity; wait(1); c_setminmax(me); while(1) { ball_move.x = (key_d - key_a) * 5 * time; if(trace_hit) { ball_gravity = 0; } else { ball_gravity = -5; } c_move(me,ball_move.x,vector(0,0,ball_gravity*time),glide | ignore_passable); wait(1); } } action platform { wait(1); c_setminmax(me); }