playMaker

Author Topic: Vector3 Clamp and Vector3 Clamp Simple  (Read 1205 times)

nuFF3

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 74
  • Are we even real?
    • One Month Studio
Vector3 Clamp and Vector3 Clamp Simple
« on: January 27, 2021, 06:57:00 AM »
Again, more actions that I can't believe no one have made before.
Previously, you would have to separate all the XYZ values of a vector3 if you wanted to clamp those values, to then put them back into another vector3. Or build the vector3 from clamped floats, etc etc.
Now I've got all that in one action.
It takes a vector3 variable, clamps it with a minimum vector3 variabel and maximum vector3 variable.
You can define the clamps per XYZ value, rather than clamp them all with only one float variable. Resulting in you being able to clamp a rectangle rather than a perfectly square box.
This action stores the result in both a separate vector3 variable, and in three separate float variables.

I also decided to make a simplified version that clamps the variable you defined, rather than storing the result in separate variables.

Hope it helps.

Vector3 Clamp



Vector3 Clamp Simple
« Last Edit: January 27, 2021, 07:18:44 AM by nuFF3 »