|
|
how to accel?
#10344
09/12/02 21:58
09/12/02 21:58
|
Anonymous
OP
Unregistered
|
Anonymous
OP
Unregistered
|
long time ago, i used accel to move my entities this code:
accel(my.relSpeed, my.relForce, 0.7); accel(my.absSpeed, my.absForce, 0.7); vec_set(my.relForce, nullvector); vec_set(my.absForce, nullvector); ent_move(my.relSpeed, my.absSpeed);
way. now i replaced accel with script
code:
speed += time * ( force - speed * frinction );
and it doesnt seem to be time corrected. but i find no error in my accel (btw, its the accel-replacement from the movement.wdl) so whats my problem?
(thanks in advance)
|
|
|
Re: how to accel?
#10345
09/16/02 18:37
09/16/02 18:37
|
Anonymous
OP
Unregistered
|
Anonymous
OP
Unregistered
|
ok, let me proof that this kind of acceleration does not work properly:
this is the formula speed += time * ( force - speed * frinction)
1) speed=10, force=0, frinc=0.5; time=1;
10 += 1*(0-10*0.5) // == 5
2) speed=10, force=0, frinc=0.5; time=0.5;
10 += 0.5 * (0-10*0.5) // == 7.5 7.5 += 0.5 * (0-7.5*0.5) // == 5.625
the difference something about 10%
|
|
|
Re: how to accel?
#10348
09/17/02 22:01
09/17/02 22:01
|
Joined: Oct 2001
Posts: 1,407 Helsinki, Finland
Phantom88
Expert
|
Expert
Joined: Oct 2001
Posts: 1,407
Helsinki, Finland
|
I said something(then posted), then thought again, and figured out, that what i said was wrong(and edited it). Sorry...
~Phantom88~
Programmer, Gamer
ICQ #: 157485106 | Xfire: Phantom1988 | MSN: lauri_andler@hotmail.com | AIM: FinPhantom | YAHOO: FinPhantom
|
|
|
Re: how to accel?
#10349
09/18/02 15:10
09/18/02 15:10
|
Anonymous
OP
Unregistered
|
Anonymous
OP
Unregistered
|
i'm interested in your theories i dont know how to go on, even a guess may help ![[Frown]](images/icons/frown.gif)
|
|
|
|