Blueprint issues with scaling.
Hey guys n girls, I have an issue and i'd like to see if anyone can solve it for me or at least help me out
I have a cube in my game which which can increase and decrease in size.. when the mouse wheel is scrolled up, the cube will increase in size by 0.25 to each vector and can do this 4 times so essentially adds 1.00 to all it's axis's X,Y and Z. When scrolled down, the cube will shrink (-0.25) to return to it's original size.
My issue is that I have to scroll up the maximum amount of times before I can shrink it it again, where as I would like to be able to grow and shrink with each scroll both up and down. The only way I have managed to get a cube to grow and shrink with restrictions as to size is in this blueprint below...
If anyone has an idea as to how I can achieve this cube sizing issue, please respond..!
asked Nov 04 '14 at 01:41 PM in Blueprint Scripting
So I was just playing about with your blueprint and I have done it! with a little bit of tweaking it's fixed and I can no scale up and down freely. Thank you so much for your help
answered Nov 05 '14 at 12:56 PM
From what I can see your whole event is based on weather the scroll up or down is at an increment of 4, so it turns off if you scrolls down 4 times and then flips back when you scroll back up 4 times. You could keep this mechanic in order to not exceed expected size. But to do the actual scaling without the bool blocking you, you should simply use +/- to your vector scale. And actually, if you don't want to exceed expected scaling, just do a compare float from a tick event. Compare it with the x,y or z float from your vector. It doesn't matter which since they will always be the same as each other.
I'll post a quick example. This works for me in the way that you seem to want.
P.S. To avoid any confusion I will clarify that in the compare float function that compares with the value 2, = goes to close gate and < goes to open.
Follow this question
Once you sign in you will be able to subscribe for any updates here