playMaker

Author Topic: fixed update[SOLVED]  (Read 6366 times)

greg

  • Junior Playmaker
  • **
  • Posts: 68
fixed update[SOLVED]
« on: March 18, 2013, 12:39:44 PM »
I need to make duplicates of a few actions and edit them to be fixedUpdate instead of Update (for character movement acceleration/deceleration)..

Whats the safe way to do this?

I tried copying the action.cs in the folder, then editing the name/class name and bit of code in notepad, but unity started freaking out. A simple step-by-step would be appreciated.
« Last Edit: January 29, 2018, 03:50:43 AM by jeanfabre »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: fixed update
« Reply #1 on: March 18, 2013, 09:10:41 PM »
Make sure the filename matches the new class name.
Then change OnUpdate to OnFixedUpdate.

Which actions are you changing? I'd like to add this option to the official actions where it makes sense...

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: fixed update
« Reply #2 on: March 19, 2013, 01:24:02 AM »
Hi,

 yes, this is very much needed, as well for selecting LateUpdate. Could we have maybe a special action field for this? then, we can spread the changes easily.

bye,

 Jean

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: fixed update
« Reply #3 on: March 20, 2013, 10:43:07 AM »
It would be nice to get FixedUpdate checkboxes in the physics actions (AddForce and AddTorque mainly) because fluctuating frame rates can yield hugely different results.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: fixed update
« Reply #4 on: March 20, 2013, 01:12:48 PM »
Hi,

 yes, this is very much needed, as well for selecting LateUpdate. Could we have maybe a special action field for this? then, we can spread the changes easily.

bye,

 Jean

What do you mean by special action field? A naming convention like "Every Frame"? There are a few actions that already have "Fixed Update" and "Late Update" options... those field names work for me :)

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: fixed update
« Reply #5 on: March 20, 2013, 01:13:17 PM »
It would be nice to get FixedUpdate checkboxes in the physics actions (AddForce and AddTorque mainly) because fluctuating frame rates can yield hugely different results.

Makes sense. I'll get those into the next update...

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: fixed update
« Reply #6 on: March 20, 2013, 02:04:27 PM »
It would be nice to get FixedUpdate checkboxes in the physics actions (AddForce and AddTorque mainly) because fluctuating frame rates can yield hugely different results.

Makes sense. I'll get those into the next update...

I just glanced at the script, it may already be using onFixedUpdate (at least, I saw it in there somewhere :P), but I'm confused on what Every Frame would mean then - every Frame or Fixed Update point?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: fixed update
« Reply #7 on: March 21, 2013, 12:56:30 AM »
Hi,

 "Every Frame" is about telling the action that the process needs to be repeated over time, then it's up to each action to define how it will be implemented, most will use Update, some will use different functions like FixedUpdate, or LateUpdate.

 I guess, the ideal way to go about this is for actions to provide a new way to define "every update" with *ALWAYS" the choice to define when  ( update, late or fixed or OnAnimatorIK and OnAnimatorMove). This would then be something that can be spreaded across all actions, and be something users are acquainted and used to on a general level. The downside it of course the initial "what's this...", so maybe an everyframe action interface with a "+" to reveal more to not scare the user away when nothing special needs to be done.

Bye,

 Jean

greg

  • Junior Playmaker
  • **
  • Posts: 68
Re: fixed update
« Reply #8 on: March 21, 2013, 07:32:10 PM »
Make sure the filename matches the new class name.
Then change OnUpdate to OnFixedUpdate.

Which actions are you changing? I'd like to add this option to the official actions where it makes sense...

Cheers Alex!
float add, float operator and controller move

theBrandonWu

  • Playmaker Newbie
  • *
  • Posts: 18
    • Studio Pepwuper
Re: fixed update
« Reply #9 on: January 28, 2018, 05:15:15 AM »
Sorry to revive an old topic. Would it make sense to add FixedUpdate/LateUpdate options to Call Method action, since custom methods might be dealing with physics...etc.?
Studio Pepwuper: http://www.pepwuper.com
One Month Game School (now on SkillShare): https://www.skillshare.com/r/user/thebrandonwu

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: fixed update
« Reply #10 on: January 29, 2018, 03:01:27 AM »
Hi,

 yes it makes a lot of sense :) It's up on the PlayMaker Ecosystem "CallMethodAdvanced"

https://twitter.com/JeanAtPlayMaker/status/957886327068004352

Bye,

 Jean

 

theBrandonWu

  • Playmaker Newbie
  • *
  • Posts: 18
    • Studio Pepwuper
Re: fixed update
« Reply #11 on: January 29, 2018, 03:44:00 AM »
Hah! Thanks for the quick turnaround!! 😎👍
Studio Pepwuper: http://www.pepwuper.com
One Month Game School (now on SkillShare): https://www.skillshare.com/r/user/thebrandonwu