Jump to content

Recommended Posts

Hi Guys,

I would like to ask your help for some code.

i have some primitives (constraints) disposed like an umbrella (one on top and many on the bottom, disposed round-is (like an umbrella).

Imagine now a sphere going along the scene, when the sphere touches any of the extreme points, il would like to transfer a parameter from the sphere to ALL the connected points.

I think I figured out how to do it but I don't know the code: I would like to know how to, having one of the 2 points of the segment, to know what is the number of the opposite point.

Thank you! Cheers!
Lazza

Share this post


Link to post
Share on other sites

 

4 hours ago, lazza79 said:

I would like to know how to, having one of the 2 points of the segment, to know what is the number of the opposite point.

Could you possibly be referring to the neighbour and/or neighbours functions?

Edited by galagast

Share this post


Link to post
Share on other sites

hmmm, no. I have several "umbrellas" sometime near to each other.

I'm afraid that using neighbor function may get a point form another umbrella...

 

Thank you!
Lazza79

Share this post


Link to post
Share on other sites

Yes, that is similar. Almost what I want.

The difference is that I would like also the 2 stars that are touched bu the polygon, fully become red.

I see in your video that when they are touched just one or 2 legs become red. I would like that if one leg becomes red, all the other legs connected do.

Thank you very much!!!

Cheers!
Lazza79

2017-03-17_174030.png

Share this post


Link to post
Share on other sites

Something like this?
vex_neighbour_v2.gif
H15.5.717 Indie - vex_neighbour_v2.zip

I updated the file and colored the changes and additions yellow.
The method I used might work or might not work on your scene as the code depends on what kind of "umbrella" geometry you're using. :D

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

×