Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: greg on March 18, 2013, 12:39:44 PM

Title: fixed update[SOLVED]
Post by: greg 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.
Title: Re: fixed update
Post by: Alex Chouls 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...
Title: Re: fixed update
Post by: jeanfabre 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
Title: Re: fixed update
Post by: Lane 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.
Title: Re: fixed update
Post by: Alex Chouls 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 :)
Title: Re: fixed update
Post by: Alex Chouls 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...
Title: Re: fixed update
Post by: Lane 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?
Title: Re: fixed update
Post by: jeanfabre 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
Title: Re: fixed update
Post by: greg 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
Title: Re: fixed update
Post by: theBrandonWu 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.?
Title: Re: fixed update
Post by: jeanfabre 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

 
Title: Re: fixed update
Post by: theBrandonWu on January 29, 2018, 03:44:00 AM
Hah! Thanks for the quick turnaround!! 😎👍