Clamp Vector and Step Value Increase?

Hey all,

I’m trying to add an offset functionality for a particle system in my blueprint and ideally I’d like to be able to lock the offset amount to a certain number (500) but also Step the adjustments by units of 10 so it’s faster to adjust in the editor (IE when you click on an axis and slide the mouse to set the value).

I’m not quite sure how to go about doing that. Here’s what I’ve got:

Unfortunately even clamping the vector doesn’t work. I can set any value I want in the details panel and I have no idea how to go about making the values increment by a value of 10.

Any help would be appreciated.

What you mean by offset number?

Anyway some hint (if i guessed correctly what you need):
Calculate unit vector out of your offset value. Multiply it by 500. There you will get vector that is 500 units long in direction of your offset vector.

To calculate unit vector use “Normalize” node.

If you want location somewhere beetwen 0 and 500 on offset vector direction. Make random float multiply that normalized vector by it.

you can use Truncate or Round on a float to discard the fractional part. for example, 1.2 would become 1. alternatively, have your input (adjusted from editor) as integer, to be converted to float inside the blueprint.

Ahh yes, I feel stupid for not realizing that simple math to limit the range would be to use a 0 to 1 amount and then multiply it by the maximum amount (500) to create a cap though would you do this with a Normalize node? Basically the part I’m unsure of is how to specify a limited value.

As for what I meant by stepping… I’d like it when the user tries to increase or decrease the value it does so in increments of 10. So 0, 10, 20, 30, 40 and doesn’t allow you to use any value in between.