stephenhalker Posted September 18, 2020 Share Posted September 18, 2020 i'm going through the "Joy of Vex" and i've run into an issue at day 7. this code (below) isn't giving me the results of this gif. /////////////// int pt = nearpoint(1,@P); vector pos = point(1,'P',pt); float d = distance(@P, pos); d *= ch('scale'); d += rand(pt); d -= @Time; @P.y = chramp('pulse',d)*ch('amp'); /////////// Joy_of_vex7issue.hipnc Quote Link to comment Share on other sites More sharing options...
stephenhalker Posted September 18, 2020 Author Share Posted September 18, 2020 Oh, and when I cancel out the rand(pt); it gets closer to the example gif. but still, I'd love to know what the right code is for getting that random positioning. int pt = nearpoint(1,@P); vector pos = point(1,'P',pt); float d = distance(@P, pos); d *= ch('scale'); //d += rand(pt); d -= @Time; @P.y = chramp('pulse',d)*ch('amp'); Quote Link to comment Share on other sites More sharing options...
dleonhardt Posted September 18, 2020 Share Posted September 18, 2020 (edited) The reason it doesn't look like in the GIF is because you connected your grid with "pointwrangle2" to your second input of "pointwrangle3". Connect your scattered points to the second input of "pointwrangle3" and you'll see that the VEX code does what it's supposed to do. Edited September 18, 2020 by dleonhardt Quote Link to comment Share on other sites More sharing options...
stephenhalker Posted September 18, 2020 Author Share Posted September 18, 2020 Beautiful. i knew I was doing something wrong. 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.