Jump to content

minpos not working


isah_voodoo

Recommended Posts

Hello,

I am trying to get the minpos function to work properly. 

I have a line and a ball.

From the ball, I want to store the closest position of the line in an attribute.

I thought that if I were to move my ball closer to a different point on the line, it would store that point position in the attribute I created.

This is not working for me. Everything is set to 0 in the geo spreadhseet. 

I will attach my scene file for anyone that wants to take a look. 

Thank you

minpos_question.hip

Link to comment
Share on other sites

Your attribute "v@p2" doesn't exist on the ball, yet you're trying to reference it in your point wrangle. I'm not really sure what you're trying to do with that attribute, to be honest.

Here's an example of what I think you're trying to do... The original sphere is templated, and the nearest point is shown as a cube sliding along the line.

 

minpos.hip

Link to comment
Share on other sites

@toadstorm Thank you for the file toadstrom. I thought that the v@p2 was coming in from the second input ? v@storePos=minpos(1, v@p2);

Actually , your file gave me a lot of good insight on whats going on with minpos.

I didn't realize that it would actually interpolate the values between each point on the line.

I was expecting minpos to actually snap the ball to each point on the line as it got closer. I guess that would still be possible ?

Thanks

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...