playMaker

Author Topic: Weird Jumping Issue  (Read 2691 times)

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Weird Jumping Issue
« on: March 06, 2022, 11:19:38 PM »
Hello,

I have a simple jumping system. 1st state Get key down, 2nd state add force 2d, set velocity 2d, get key up, and wait, then 3rd state collision 2d event, finally looping back to state 1. This works almost perfectly. However, if I quickly tap the jump key, the get key up doesn't seem to register and it waits the whole time, jumping the max height, despite barely tapping the jump button. I don't know if playmaker can't register it fast enough or what. Also, just so you know, I am using custom actions found on the forum for gamepad support, but the issue happens with or without this, so it is not related to the issue. Regardless, it would be nice if I could still use the custom actions. Hopefully it's just as simple as increasing playmaker's sensitivity or something. Thanks!

John Bassi

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Re: Weird Jumping Issue
« Reply #1 on: March 07, 2022, 11:45:28 PM »
Bump.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Weird Jumping Issue
« Reply #2 on: March 08, 2022, 01:07:23 PM »
Hi.
Instead of using Get Key Down/Up, use Get Key and Bool Test.

Key down/up will only register if you pressed down/up while in that state.

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Re: Weird Jumping Issue
« Reply #3 on: March 10, 2022, 02:19:19 PM »
I tried it, and while very hard to pull off, the glitch keeps happening. I thought it was maybe because of the custom actions I was using, but I tried with just get key and bool test and it still happened. Is there a way to increase playmaker's speed so this doesn't happen, or is there another solution you have in mind. Thanks for your help again. Looking forward to hearing back!

John Bassi

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Weird Jumping Issue
« Reply #4 on: March 10, 2022, 03:36:30 PM »
Hi.
Can you show the setup.
playmaker is as fast as c# scripts :)


misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Re: Weird Jumping Issue
« Reply #5 on: March 10, 2022, 10:28:57 PM »
Here it is. I have a bunch of triggers on the first state since I have multiple types of ground and I have several transitions that don't lead anywhere from older versions of the FSM. Nothing that should affect what's going on.

Thanks!

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Re: Weird Jumping Issue
« Reply #6 on: March 10, 2022, 10:29:50 PM »
Heres the last photo (it wouldn't fit on the other post)

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Re: Weird Jumping Issue
« Reply #7 on: March 12, 2022, 01:12:26 PM »
bump

ChinaUnity

  • Playmaker Newbie
  • *
  • Posts: 16
Re: Weird Jumping Issue
« Reply #8 on: March 14, 2022, 05:34:03 AM »
是不是因为你发送事件太乱。导致循序混乱。如果按的速度太快,playmake会就出现错乱循序。如c#结果一样

blackant

  • Hero Member
  • *****
  • Posts: 525
  • http://blackantmaster.com
    • blackantmaster.com
Re: Weird Jumping Issue
« Reply #9 on: March 14, 2022, 07:19:20 AM »
It's all about the timing between the action (up or down) and the state in which the game is at this moment.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Weird Jumping Issue
« Reply #10 on: March 14, 2022, 01:50:04 PM »
By fast tapping its also possible that you get instant grounded from collider/trigger

i use raycasts/boxcasts for grounded/not grounded
when player jumps and releases i check first for not grounded.
also there is a minimum time for jump so it will give a force (velocity in our game)
till the minimum time reached, then depending on button release or maximum time for force.
then check for grounded

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Re: Weird Jumping Issue
« Reply #11 on: March 15, 2022, 11:51:22 AM »
So in my FSM, in which state or in between which states would I put the collision exit? Thanks!

John Bassi

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Weird Jumping Issue
« Reply #12 on: March 15, 2022, 12:15:31 PM »
Hi.
Right after player pressed jump, also have a force there