The common maybe professional way for using key inputs seems to be something like that:

Code:
pXent_addforcecentral(ball, vector((key_cur-key_cul)*0.1, 0, 0));



I wonder if the more clearly "newby" way...

Code:
if (key_cul) pXent_addforcecentral(ball, vector(-0.1, 0, 0));
if (key_cur) pXent_addforcecentral(ball, vector(0.1, 0, 0));



...is not probably even faster? Isn't it easier for the engine checking if the key is pressed every frame intead of calculating every time addforcecentral?

Of course it also depends on the command which is used for the calculating... So what's the best rule of thumb?

Last edited by Clemens; 02/01/11 09:49.