プレイ日記
Aaron Krondelo
Can anyone help, or know how to implement acceleration/decel? I feel like this would almost work, but I cant figure out how to make your position keep going after letting go of button w/SPOFS!?
3そうだね
プレイ済み
返信[1]
親投稿
Aaron Krondelo
I believe the timing works pretty well, somewhat accurate, but I cant test it without SPOFS working. Im think I need FOR loops.
0そうだね
プレイ済み
返信[2]
親投稿
Aaron Krondelo
Oops, just realized too if you don't hold left or right T will go negative, I can fix that.
0そうだね
プレイ済み
返信[3]
親投稿
Aaron Krondelo
My bad, also realized I was describing momentum there with SPOFS. which isnt necessary.
0そうだね
プレイ済み
返信[4]
親投稿
DasEtwas MyTheo00
You can use the Verlet integration. Make a FOR loop containing: X=X+ ??? Y=Y+ ??? VX=X[I]-OLDX[I]*FRICTION VY=Y[I]-OLDY[I]*FRICTION OLDX[I]=X[I] OLDY[I]=X[I] X=X+VX Y=Y+VY the arrays OLDX and OLDY are needed
0そうだね
未プレイ
返信[5]
親投稿
DasEtwas MyTheo00
most people use the Euler integration, but then you modify VX instead of X directly, like in the verlet integration. And verlet is more accurate, saving only points instead of smaller velocity values
1そうだね
未プレイ
返信[6]
親投稿
Aaron Krondelo
Hmm, not sure I fully understand, Ill have to check that out. Strangely enough I got accel working, but only when I push UP? I swear the code looks exactly the same for each direction. It's changed a bit from SS.
0そうだね
プレイ済み