Posted By: theDust
Timing problem - 02/25/09 00:48
Hellooo, I've made a little test arrangement:
You let a physical object, let's say a ball, jump with the space-key. When the ball is hitting the ground and space is pressed a force, i use phent_addvelcentral(ENTITY*,VECTOR* speed), will move the object. No problem so far.
You keep pressing space. Now you see, the jumps doesn't have a constant height. Sometimes the ball jumps right in the moment when he has touched the ground. And sometimes he sticks to the ground a few millisecs and makes a jump half of the height as the jump before.
The ball doesn't move and doesn't rotate, its only jumping. You can clearly see, something at the timing goes wrong
I've set fps_max = 60 and when i raise the "ph_fps_max_lock" the collision-detection gets a bit better, but its far from good. Any idea ?
You let a physical object, let's say a ball, jump with the space-key. When the ball is hitting the ground and space is pressed a force, i use phent_addvelcentral(ENTITY*,VECTOR* speed), will move the object. No problem so far.
You keep pressing space. Now you see, the jumps doesn't have a constant height. Sometimes the ball jumps right in the moment when he has touched the ground. And sometimes he sticks to the ground a few millisecs and makes a jump half of the height as the jump before.
The ball doesn't move and doesn't rotate, its only jumping. You can clearly see, something at the timing goes wrong
I've set fps_max = 60 and when i raise the "ph_fps_max_lock" the collision-detection gets a bit better, but its far from good. Any idea ?