playMaker

Author Topic: Mathf.Sign  (Read 2316 times)

zorranco

  • Junior Playmaker
  • **
  • Posts: 50
Mathf.Sign
« on: October 21, 2015, 11: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
Re: Mathf.Sign
« Reply #1 on: October 21, 2015, 08:51:26 PM »
tbh this seems like something you could very easily construct with a simple float compare?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Mathf.Sign
« Reply #2 on: October 22, 2015, 01:28:37 AM »
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

  • Junior Playmaker
  • **
  • Posts: 50
Re: Mathf.Sign
« Reply #3 on: October 22, 2015, 04: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, 04:48:16 AM by zorranco »

zorranco

  • Junior Playmaker
  • **
  • Posts: 50
Re: Mathf.Sign
« Reply #4 on: October 22, 2015, 06:02:36 AM »