playMaker

Author Topic: How to Float Clamp an Axis  (Read 3415 times)

Prototype_6492

  • Junior Playmaker
  • **
  • Posts: 50
How to Float Clamp an Axis
« on: October 23, 2015, 04:27:17 PM »
I wanted to use a float clamp to add a minimum and maximum vale for the z position. How would I go about doing that?

Nog

  • Playmaker Newbie
  • *
  • Posts: 47
Re: How to Float Clamp an Axis
« Reply #1 on: October 23, 2015, 06:53:31 PM »
Hello Prototype_6492,

You could try using the Get Position action to get the position of the game object, use the Get VectorXYZ action to retrieve the Z position from that vector, use the float action to set your min and max of the Z position from the Get VectorXYZ action, set all of that information into another vector using the Set Vector action, and use that vector in the Set Position action on the game object.

I hope that makes sense.

Nog

ManicMinerUK

  • Junior Playmaker
  • **
  • Posts: 51
Re: How to Float Clamp an Axis
« Reply #2 on: October 23, 2015, 10:05:02 PM »
pretty sure GetPosition will let you put each axis in separate floats on its own, without needing the VectorXYZ stuff.

Nog

  • Playmaker Newbie
  • *
  • Posts: 47
Re: How to Float Clamp an Axis
« Reply #3 on: October 23, 2015, 10:38:24 PM »
Yeah, I believe ManicMinerUK is right, so you could use the Get Position action and grab the Z axis, and use the Float Clamp action to set the Min and Max of the Z axis.

Thanks ManicMinerUK!
« Last Edit: October 23, 2015, 11:15:25 PM by Nog »

Prototype_6492

  • Junior Playmaker
  • **
  • Posts: 50
Re: How to Float Clamp an Axis
« Reply #4 on: October 24, 2015, 02:34:17 PM »
Awesome thanks guys!

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How to Float Clamp an Axis
« Reply #5 on: February 14, 2021, 04:00:52 PM »
Sample action