hi! i'm trying to optimize the jump code i'm using as base the kingdom heart movement in lite c i've got some problem first on switching fullscreen and windowed mode cause in windowed thechar make a tiny jump in fs char make a good height jump
the code from khmovements was this:
if ((key_space) && spacebar_clear)
{
spacebar_clear = 0;
if (distance_to_ground < 3)
{
move_to_vector.z = 9.4;
}
}
if (!key_space) spacebar_clear = 1;
then cause in a movement generally i see other put the time_step val to obtain correct ratio fps/time adaptation
and i've tried this
if ((key_space) && spacebar_clear)
{
spacebar_clear = 0;
if (distance_to_ground < 3)
{
move_to_vector.z = 9.4*time_step;
}
}
if (!key_space) spacebar_clear = 1;
now in both full and windowed mode the char made the same jump
and i was half happy because every jump the char does has not the same intensity, does someone know how to solve this?thanks:D