Skip to content

Bad jump behavior with Zero WishVelocity #7

@MDFL64

Description

@MDFL64

When WishVelocity is zero, jumps are shorter. Now, this isn't a huge discrepency, and depending on your preferences, it might be desired. But the difference becomes extremely pronounced at low gravity:

http://tmp.bz/240920-HcpKhpdA8Kk9jsIioKx3.mp4

I beleive the culprit is this line, which helps drive the Velocity towards the WishVelocity -- including the gravity:

https://github.com/Small-Fish-Dev/shrimple_character_controller/blob/main/code/ShrimpleCharacterController.cs#L646

I initially found this line pretty questionable in it's entirity, but upon testing I found that you still get consistent jump times and heights at a wide range of speeds. It's mainly just an issue when WishVelocity is zero.

Disabling "Ignore Z" and "Ignore Z when zero", and only providing a 2D wish seems to fix it without adverse effects. Maybe messing around with acceleration / deceleration values would also fix it. That said, I think it's fair to say this is a bug.

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