"Per Second" checkbox

Forums 💬 NodeCanvas ⚙️ Support "Per Second" checkbox

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17719
    nodeshelp
    Participant

      Could you please explain how the “Per Second” checkbox in the Set Float action works? Sorry, I couldn’t find anything the manual.

      #17722
      Gavalakis
      Keymaster

        Hey,

        The “Per Second” option is really only relevant when you have set the Operation in anything other than “Set”, so like for example “Add”, or “Subtract”.
        If “Per Second” option is enabled, then ValueB is multiplied by Time.deltaTime, before “Added”, “Subtracted” or otherwise to ValueA.
        You essentially can enabled “Per Second” if you for example want to increase (Add to) ValueA, by ValueB per second, while without “Per Second” enabled, the operation will take place per frame.

        For your convenience, here is the Unity documentation for Time.deltaTime, which I think will also help you understand this concept better 🙂 :
        https://docs.unity3d.com/ScriptReference/Time-deltaTime.html

        Please let me know if you need more clarification on the above.
        Thanks!

        #17721
        nodeshelp
        Participant

          Thanks! That’s really helpful. I was trying to figure out how it works with “Set” 🙂

          #17720
          Gavalakis
          Keymaster

            You are welcome. I am very glad I could help! 🙂

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.