Skip to content

More realistic Gravity #751

@cawoodm

Description

@cawoodm

The Gravity compontent in crafty seems needlessly crude and unrealistic.

  1. True gravity is a force which works on your velocity but this "gravity" works directly on this._y. This means, no matter what speed you are moving up gravity instantaneously starts moving you down instead of slowing you down.
  2. True gravity works from below. My tests have shown my player will stick to platforms from below, apparently from the side and even inside. I am not using the standard movement components but my own Motion component which has a simple speed method.

Improving item 1 is really simple, 2 perhaps less so. Before I go off and re-invent the wheel, is there a better set of components I should be using for motion and why is Crafty so cra..., I mean crude out of the box in this respect?

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions