Skip to content

what does drag = 1 even mean? #424

Answered by mflerackers
dragoncoder047 asked this question in Q&A
Discussion options

You must be logged in to vote

Drag is old Kaboom code which still needs to be fixed. It's actually damping, since drag would be through a medium, and depend on geometry. Damping is a ratio, so it should be

this.vel.x *= 1.0 / (1.0 + this.damping * k.dt());
this.vel.y *= 1.0 / (1.0 + this.damping * k.dt());

The physics framerate is always 50fps, regardless of the display framerate.

Replies: 5 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@dragoncoder047
Comment options

Answer selected by dragoncoder047
Comment options

You must be logged in to vote
1 reply
@dragoncoder047
Comment options

Comment options

You must be logged in to vote
1 reply
@dragoncoder047
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dragoncoder047
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants