Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

add linearDrag, maxLinearVelocity and drag modes #2704

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

Geokureli
Copy link
Member

Adds:

  • FlxObject: added various physics fields
    • maxLinearVelocity: caps an object's velocity based on it's magnitude
    • linearDrag: applies a drag amount to an velocity's magnitude
    • dragMode: determines when drag.x/y is applied to velocity.x/y
    • linearDragMode: determines when linearDrag is applied to velocity
    • angularDragMode: determines when angularDrag is applied to angularVelocity
  • FlxDragMode: Enum for determining when drag is applied to velocity (used above)
  • FlxDragMode2D: Allows separate dragModes for different axes of a FlxPoint (used above)

@Geokureli Geokureli marked this pull request as draft December 22, 2022 20:35
@Geokureli
Copy link
Member Author

gonna shelf this for a bit. it seemed to confuse people, maybe there's a better rollout

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant