Jump to content
amin.khormaei

nearpoint doesn't obey the position of second input

Recommended Posts

I'm gonna use nearpoint with the position of add+transform.

int point = nearpoint(0,v@opinput1_P,1);
if(point == @ptnum)
{
    @Cd = {1,0,0};
}

but it doesn't work.

Screenshot (64).png

Share this post


Link to post
Share on other sites
vector pos = point(1, "P", 0);
i@npt = nearpoint(0, pos, chf("dist"));
 
if(@ptnum == @npt){
   @Cd = {0, 0, 1};
   @P += {0, 0.25, 0};
}

 

  • Like 1

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

×