Trilec Posted September 18, 2022 Share Posted September 18, 2022 Hi All, Quick question, Objective: I have two points (could be any orientation), If the distance is greater than "x" meters ( in world units, 0.5m in this example) I would like to add an additional point 0.25 Meters along the vector (eg.from first point two second point direction) is there a VEX function for this? cheers Quote Link to comment Share on other sites More sharing options...
animatrix Posted September 19, 2022 Share Posted September 19, 2022 Hi, There is no specialized function to do this but you can run this in a Detail Wrangle: vector p0 = point ( 0, "P", 0 ); vector p1 = point ( 0, "P", 1 ); vector dir = p1 - p0; if ( length ( dir ) > 0.5 ) { vector n = normalize ( dir ); addpoint ( 0, p0 + n * 0.25 ); } Quote Link to comment Share on other sites More sharing options...
Trilec Posted September 19, 2022 Author Share Posted September 19, 2022 tks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.