Coder Social home page Coder Social logo

Comments (5)

cjddmut avatar cjddmut commented on August 20, 2024

This may be tied to having a deceleration of speed when stopping. Try setting ground stop distance to 0 and see if it resolves the issue. If it doesn't then it's a bug.

from unity-2d-platformer-controller.

jsnetors avatar jsnetors commented on August 20, 2024

Ive tried dealing with the ground stop distance but it did nothing, control doesn't get more or less tight. I noticed that the longer you keep the direction you want to jump pressed, the longer is the after-lading step. Maybe there's something there.

from unity-2d-platformer-controller.

cjddmut avatar cjddmut commented on August 20, 2024

Another thing to pay attention to is that if you're using the default controller script it uses Input.GetAxis("Horizontal") to get the button/joystick press amount. If the button is unpressed or the joystick set back to neutral then Unity will deceleration towards 0 over some period of time. Try updating the controller script to using Input.GetRawAxis instead.

From the FAQ:

I let go of the joystick and my GameObject isn't sliding the distance it is supposed to!
If you're using the supplied PlayerController2D script or one of your own in which you use Input.GetAxis() then there's a built in deceleration in what Input.GetAxis() returns. This can definitely be impacting the distance the GameObject skids to a stop! To see a true skid to stop, set normalizedXMovement to zero.

from unity-2d-platformer-controller.

jsnetors avatar jsnetors commented on August 20, 2024

Changed horizontal movement setting to getaxisraw and it fixed the issue, tho it no longer jumps in archs but actually drops straight after I let go of the horizontal key. Anyway, it's a satisfactory improvement!

from unity-2d-platformer-controller.

cjddmut avatar cjddmut commented on August 20, 2024

You can fix that issue by changing the air stop distance to something greater than zero (that's used to calculate the air deceleration).

from unity-2d-platformer-controller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.