Move Object Center to Selected Point(s)

   7166   3   0
User Avatar
Member
4 posts
Joined: Sept. 2018
Offline
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
708 posts
Joined: Feb. 2017
Offline
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: June 2017
Offline
why the thumbs down? perfect answer
User Avatar
Member
682 posts
Joined: Sept. 2013
Offline
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