1
$\begingroup$

I've been working on a rig for a go-kart for a game I've been working on. I would like the bones controlling the position and rotation of each of the tires and of the steering wheel to be centered within them, so what's the best way to center a bone, or at least one tip of the bone, to be at the midpoint between a group of vertices? Most of my research so far has only returned results about vertex weighting.

In case it's important, I'm going for a low-poly style, so each tire is just a 10-verticed cylinder with no bevel or anything, and the steering wheel is just a quad at the end of a rectangular prism.

$\endgroup$
1
  • $\begingroup$ You could select the vertices, press Shift S > Cursor to Selected, then select the bone's tail, Shift S > Selection to Cursor, but I wonder if there's not a solution with the Snap option, I guess it also depend on the situation $\endgroup$
    – moonboots
    Commented Aug 15, 2023 at 21:16

1 Answer 1

0
$\begingroup$

Technically, literally, you can copy the location of a group of vertices by assigning those vertices to a vertex group, and then using a copy location constraint to target that group; for the tail, you can stretch-to constraint that group. Once you have constraints, you can just apply as rest pose (ctrl a menu in pose mode) and then clear constraints ("clear pose constraints" operation.)

That's a little tedious, but almost unavoidably so, to do exactly what you want. The alternative is snapping cursors to vertices and then bones to cursors, which is equally tedious. With few bones, and thus few mode changes, cursors are easier; with lots of bones and lots of mode changes, constraints are easier.

Something I recently did, that's easier, to make an armature quickly: Make a string of vertices. Assign all vertices to a vertex group ("Group") at 0.5 strength. Give it a shrinkwrap modifier, on project Y mode, targeting your mesh; set this modifier to outside surface, with an offset of -0.001 or something. Give it a second shrinkwrap modifier, on project Y mode, projecting only forward, limited by Group. Give the mesh a skin modifier, then hit the "create armature" button on the skin modifier.

enter image description here

This creates an armature centered not between vertices, but between surfaces. It's almost in the middle of surfaces, projected in the object's Y axis-- not quite, because of the tiny 0.001 offset on one of the shrinkwraps. You can delete the mesh object after creating the armature; the only reason for the mesh object was to quickly create the armature.

This armature can be joined to other armatures as desired. Some reversal and/or reparenting of bones should be expected. If you have disconnected bones, verts of disconnected strings will have to be marked as root verts on the skin modifier to create bones from them.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .