Jump to content
Sign in to follow this  

Wrangle: How to stop point from being transformed with VEX

Recommended Posts



I am new to programming, but i would like to know something.

I have two lines of who the length is copied by reference, i want one line b to be of 75% of line a. I have accomplished this by selecting a point of line two in a wrangle and typing:

@P.x = @P.x * 0.75;

But now i want line b to stop when it hits 0.75, while the length of line a continues to increase. I have tried to do this by typing:

while (@P.x == 0.75){
@P.x = 0.75;

But that doesn't work. 

How is this done?


Thanks. :) 

Share this post

Link to post
Share on other sites

something like this maybe?

@P.x = min(@P.x, 0.75);

this will not allow any of the points to be further in X than 0.75

so as your line is expanding it will not go past 0.75 in X

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this