playMaker

Author Topic: Playmaker 1.9.4.f2 Get Velocity 2d + Clamp + Set Velocity 2d broken [SOLVED]  (Read 468 times)

Faluk

  • Playmaker Newbie
  • *
  • Posts: 2
Hello!

With the latest update this combo that we are using to restrict the max velocity of our objects is broken.

After debugging a little bit it seems related to the fact that Get Velocity and set velocity is now executed in a fixed updated completely isolated from the state actions. So if we have those 3 actions one after another (we have them in execute every frame) they are actually not executing in order, causing problems.

We have more problems in other cases but I'm pretty sure that are coming from the same kind of problem.

I added some debug logs to confirm this. Attached is the state actions and also the debug output that confirms this problem.

Is there another way to clamp the velocity now? Shouldn't the whole FSM be executed on fixed update instead if ts in the PlayMakerFixedUpdate.cs script list instead of splitting up action executions in a state?

Thank you for your help!

« Last Edit: April 18, 2022, 03:48:05 PM by Faluk »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: Playmaker 1.9.4.f2 Get Velocity 2d + Clamp + Set Velocity 2d broken
« Reply #1 on: April 18, 2022, 01:54:47 PM »
Hi, yeah we changed Get/Set Velocity to work in fixed update so they worked better with other physics actions working in fixed update. However, this was an unforeseen side effect, sorry about that! I've attached a version of Get/Set Velocity actions that work in both Update and FixedUpdate. Can you let me know how they work in your project? Thanks!

Faluk

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Playmaker 1.9.4.f2 Get Velocity 2d + Clamp + Set Velocity 2d broken
« Reply #2 on: April 18, 2022, 03:46:58 PM »
Hello Alex,

Yes this seems to fix the problem. I will report any other problem that might be found. I hope this fix is released officially soon. :)