playMaker

Author Topic: How do one work with "Infinity"?  (Read 2199 times)

FritsLyn

  • Full Member
  • ***
  • Posts: 191
How do one work with "Infinity"?
« on: July 16, 2013, 04:24:05 PM »
Hmm, I know of course that is a big and existential question, but I am merely thinking of for instance if an action as a result is setting a float to the value "Infinity" :)

Then if for instance you want to make a float switch, how would you use this "value"?

(As of now I am always just:

Float = float -1
Do switch, -1 is zero and "Infinity"
Float = float +1

)

But that leaves 0 out, cannot be used, is same as Infinity..

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: How do one work with "Infinity"?
« Reply #1 on: July 16, 2013, 11:13:25 PM »
There's no way currently to specify static properties like "infinity" in action parameters. You could write a custom action like Float Is Infinity, or Set Float To Infinity.

I would like to extend the UI so you could access static properties like float.Infinity, Vector3.forward etc. Maybe in the variable selection pop up...

FritsLyn

  • Full Member
  • ***
  • Posts: 191
Re: How do one work with "Infinity"?
« Reply #2 on: July 17, 2013, 04:04:24 PM »
That'd be cool :)