nodemules / SuperPlatformerBros

1 stars 0 forks source link

Every so often jump does not work #73

Open johngreedjr opened 6 years ago

johngreedjr commented 6 years ago

Sometimes jump just doesn’t work. Is this a grounding error or something else? It seems rare, perhaps something with Update()? Seems to, but it could be in my head, occur with the very first jump.

johngreedjr commented 6 years ago

https://answers.unity.com/questions/294079/unity-keydown-doesnt-always-register.html

so it's FixedUpdate that is the issue for some people.. weird

johngreedjr commented 6 years ago

Also worth noting- the first time I start the game the jump button never works on the controller. It's like you have to press it once for the code to start recognizing it. For example:

                if (Input.GetButtonDown("Jump"))
                {
                    print("jump button");
                    Jump();
                }

that print statement never fires the first time I press jump. Strangely, it works on the keyboard the first time.

johngreedjr commented 6 years ago

https://forum.unity.com/threads/problem-with-detecting-getkeyup.399184/#post-2606266

johngreedjr commented 6 years ago

So the issue of it not working the first time doesn't occur in the Mac build.. so fuck this goose chase for now.