Forum rules - please read before posting.

Run with shift ignores gravity

when I run with shift pressed the player ignores the gravity, but when I walk he obeys. the Y e Z constrains are on, freeze rigdbody when idle is on too and move with rigidbody 2d is also on.
What could it be?

https://imgur.com/a/zoyKidM

Comments

  • What are your AC/Unity versions, and are any non-AC components/scripts involved?

    Which direction are you pressing when he starts moving upward? I'll need to see the character's full Inspector and the Settings Manager to begin a recreation.

  • sorry is: unity 2021.2.7f1
    ac 1.74.5
    just happens when I press 'w' (up) and shift. when I press 'a' and 'd' it goes normal.
    https://imgur.com/a/8wKlisR

  • Thanks - I'll attempt a recreation.

  • It appears to be a case of the higher run speed allowing the character to "escape" the effects of gravity.

    You can try increasing the mass, but if you want to prevent up/down input altogether you can use the Player: Constrain Action to disable those axes.

    However, if you're looking to have the player "snap" to a ground collider, you can make use of this script on the AC wiki:

    https://adventure-creator.fandom.com/wiki/Snap_2D_characters_the_ground

  • I put the up constrain in the 'action list start' and its working, but its nice to know about this script. thank you.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.