playMaker

Author Topic: Mathf.Sign  (Read 1432 times)

zorranco

  • Playmaker Newbie
  • *
  • Posts: 44
    • View Profile
Mathf.Sign
« on: October 21, 2015, 08:24:25 AM »
Hello, I am trying to perform a simple Mathf.Sign, but I haven't find any action that does this, not even in the ecosystem.

Maybe it is embedded in some "float operator advanced"action, but I can't find it.

Thanks

ManicMinerUK

  • Junior Playmaker
  • **
  • Posts: 51
    • View Profile
Re: Mathf.Sign
« Reply #1 on: October 21, 2015, 05:51:26 PM »
tbh this seems like something you could very easily construct with a simple float compare?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4620
    • View Profile
    • jinxtergames
Re: Mathf.Sign
« Reply #2 on: October 21, 2015, 10:28:37 PM »
Hi,
ManicMinerUK is right,
you need 2 "float compare" actions to do so.
i can make a single action for it if you want.

it would have 3 values then 1 for minimum 1 for maximum and one for the value that needs to be compared

And i can give it 3 events : less than minimum / greater than maximum / inbetween the 2 values

and maybe an error if for example minimum is greater than maximum

zorranco

  • Playmaker Newbie
  • *
  • Posts: 44
    • View Profile
Re: Mathf.Sign
« Reply #3 on: October 22, 2015, 01:00:49 AM »
Ok, I asked because the actions I am using are all packed in a single state running every frame, and I would like to keep it that way...splitting into more states is a little pain...But if there is no action available, no choice, I will use float compare instead.

A mathf.sign action would be great, though :D I am going to make a request

Thanks for help.
« Last Edit: October 22, 2015, 01:48:16 AM by zorranco »

zorranco

  • Playmaker Newbie
  • *
  • Posts: 44
    • View Profile
Re: Mathf.Sign
« Reply #4 on: October 22, 2015, 03:02:36 AM »