トピック
Phoenix B) epicphoenix4

How 2 Platform.

How do I make platformer physics? All i need is how to jump.
1そうだね
プレイ済み
返信[1]
親投稿
Zee Storybookten9
Well what I like to do is have a "gravity" variable to calculate upwards force. So when you hit "a" gravity is set to 5 or so. Then every frame you go up 5, but each frame that you're not on the ground, gravity goes down .2 or so down into the negatives. It requires ground detection, and idk the best way to do that.
0そうだね
プレイ済み
返信[2]
親投稿
Phoenix B) epicphoenix4
Ah.
0そうだね
プレイ済み
返信[3]
親投稿
DasEtwas MyTheo00
you must have velocity variables for the character and use those to move it by adding them to the coordinates every tick. Don´t forget to add friction to it or you´ll end up with sonic.. xD Make a Def called FRICTION FRIC=blabla DEF FRICTION IF PLAYERXVEL>FRIC THEN PLAYERXVEL=PLAYERXVEL-FRIC ELSE PLAYERXVEL=0 END END call FRICTION every tick then
0そうだね
未プレイ
返信[4]
親投稿
Phoenix B) epicphoenix4
cool cool.
0そうだね
プレイ済み