Jump to content

Placing objects on the face of another object


Recommended Posts

I am working on creating a plug in object to lay out a stage and I would like it to adjust the leg heights according to the ground elevation. I am thinking that the ground elevation should be a NURBS surface to show the change in elevation. How would I get the elevation, the z point, at point (x,y)? How do I detect when an object passes through a surface? Any help is appreciated

Link to comment

You basically answered your own question already. 😅 Look at vs.GetZatXY.

 

It can be a little flakey from my experience though, and works best when you specify the object handle rather than leaving it as None and having it figure things out for you. Even when specifying the object to check against I occasionally still get incorrect results which cause some situational funkiness.

  • Like 1
Link to comment

So perhaps I am not understanding this correctly. I attempted to use vs.GetZatXY() and the symbols placed at this value are inserting below the "ground" polygon. I have tried to make the ground a NURBS surface instead but did not change the results. I suspect that I am doing something wrong in terms of reference points, but am not sure what that would be.  I attached the file in the event of the likelihood that it's user error. 🤣

 

 

FootPlacement.vwx

Link to comment

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.   Restore formatting

  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...