Follyx Posted October 20, 2020 Share Posted October 20, 2020 a nearpoint selection. I want to move the tagged points in a foreach loop in y direction. dont get it to work. Seems to be to basic... lol geo 0 is a cube, 1 is a sphere. ... int origin = chi("source"); vector pos = point(1, "P", origin); float distance = ch("dist"); float height = ch("height") int targets[] = nearpoints(0, pos, distance); foreach(int pt; targets); { setpointattrib(0, "Cd", pt, 1, "set"); setpointattrib(0, "P.y", pt, height, "set"); //@P.y = @height; } ... really, not able to figure it out. Wow. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
animatrix Posted October 20, 2020 Share Posted October 20, 2020 Hi, You have to set P as a whole by using the original P so something like this: vector origp = point ( 0, "P", pt ); vector pnew = set ( origp.x, height, origp.z ); setpointattrib ( 0, "P", pt, pnew ); 1 Quote Link to comment Share on other sites More sharing options...
Follyx Posted October 21, 2020 Author Share Posted October 21, 2020 (edited) Great, fantastic Sir ;-). Thank you. Edited October 21, 2020 by Follyx 1 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.