Move Object Center to Selected Point(s)

   8579   3   0
User Avatar
Member
4 posts
Joined: 9月 2018
オフライン
Hi,

Is there similar functionality in Houdini (Transforming object center to selected point(s)), if not I appreciate some tips on how to create it with SOP/VEX if possible

Thanks,
Homam
User Avatar
Member
786 posts
Joined: 2月 2017
オンライン
Hey hbahnassi,

you can make a group containing the points you want the center to be. Then use the match size node and toggle the "use groups to determine justification bounds". Select your group there and set Justify X,Y,Z values to your liking.

Cheers
CYTE
User Avatar
Member
5 posts
Joined: 6月 2017
オンライン
why the thumbs down? perfect answer
User Avatar
Member
718 posts
Joined: 9月 2013
オフライン
In a VEX point wrangle it may be:

// INPUT 0: Mesh to be translated
// INPUT 1: Points with group 'sel'

vector pos_center = getbbox_center(0);
vector pos_pts = getpointbbox_center(1, 'sel');

v@P += pos_pts - pos_center;
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
  • Quick Links