|
|
Re: Problems with player movement (Framerate + Collision Box)
[Re: Rondidon]
#356526
02/02/11 16:53
02/02/11 16:53
|
Joined: Nov 2010
Posts: 96 Vienna
Schubido
Junior Member
|
Junior Member
Joined: Nov 2010
Posts: 96
Vienna
|
Muffel said So you have to multiply the speed with the time to get the distance.
This explanation of the problem was correct - it seems he just forgot to write it in the code. Change the line player_movedist[2] = player_z_speed; to player_movedist[2] = player_z_speed*time_step; (= multiply speed with time)
|
|
|
Re: Problems with player movement (Framerate + Collision Box)
[Re: xxxxxxx]
#356533
02/02/11 17:34
02/02/11 17:34
|
Joined: May 2009
Posts: 5,377 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,377
Caucasus
|
@xxxxxxx: You can't change BBOX manually without setting it's FAT and NARROW! @Rondidon: I can send you a framerate independent movement with jumping if you need me to, just send me PM. About BBOX (TESTED):
action hero()
{
my.eflags |= FAT | NARROW;
wait(1);
vec_set(my.min_x,vector(-15,-15,-35)); // PLAY WITH NUMBERS
vec_set(my.max_x,vector(15,15,35)); // X Y Z
//while loop and so on...
}
Have no idea (and no time to check) about framerate problem you have, but as I said, can send working one.
|
|
|
Re: Problems with player movement (Framerate + Collision Box)
[Re: 3run]
#356539
02/02/11 17:46
02/02/11 17:46
|
Joined: Aug 2002
Posts: 2,183 Germany, BaW�
Rondidon
OP
Expert
|
OP
Expert
Joined: Aug 2002
Posts: 2,183
Germany, BaW�
|
It`s maybe stange, but with this values the code is 98% framerate independant. Same jump hight at 5FPS and 80FPS. Maybe the Acknex engine confuses the time_frame and time_step variables in huge projects with many simultan functions and many entities? Hm. player_movevector[2]=4+4*time_frame;@3Run I try to get my own to work without bugs. But if I really get stuck anywhere, I`ll PM you  Thanks. @xxxxxxx Yes and it seems to work. Thanks very much. I forgot to set those flags when I tried to setup the collision box manually like 3Run said. Thank you very much. I really appreciate your help!
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|