why when I apply a force through x and y, z changes its value too?
force.x = 10;
force.y = 10;
force.z=0;
and when I'm debugging, it shows a value
force.x=10.008;
force.y=10;
force.z=1.004950
those values is just for example.
Tubez
10-04-2007 20:41:31
I presume it's a product of the integration step. Basically, the numbers change as time passes.
It's too large an effect to be purely floating point rounding.
Do you check the values immediately after having set them? If you check them outside the callback they will likely have changed.
walaber
10-04-2007 21:27:14
I think that's just because of floating point precision issues, and also issues with the algorithms that print out values into strings.
Tubez
10-04-2007 22:06:47
8 parts in 10000 a floating point precision issue? That's like an 11 bit mantissa! Even throwing all caution (and IEEE standards!) in the wind, that's far too much.
FP errors accumulate over time, but getting an error this large just by setting and getting an FP value is just nuts.
I'm betting there's some real algorithmic deterministic reason for this buried in the innards of the original program.
Game_Ender
11-04-2007 03:11:33
I am in agreement, that is a very large error. Is the object hitting something? That would be simplest cause of movement in a direction other than the direction you tell it.
is there a way to anulate the third dimension?
I really dont want it to move in z axis....
I'm correcting the z value every time in callback xD
setting it up to zero xD