Feat/outline thickness and tp weapon hold #22
@@ -108,6 +108,19 @@ static func _dist_to_chain(p: Vector3, chain: PackedVector3Array) -> float:
|
|||||||
|
|
||||||
|
|
||||||
## Drive the helpers. MUST run inside the skeleton's modification pass.
|
## Drive the helpers. MUST run inside the skeleton's modification pass.
|
||||||
|
##
|
||||||
|
## Two things happen per joint:
|
||||||
|
##
|
||||||
|
## ROTATION — the helper takes half the child's bend, so no vertex ever blends
|
||||||
|
## across the full angle.
|
||||||
|
##
|
||||||
|
## Scaling the helper to widen the joint back out was tried and removed. The
|
||||||
|
## geometry is right — a blend across θ thins by cos(θ/2), which is |q.w| — but a
|
||||||
|
## BONE scale is far too blunt an instrument for it: it fattens every vertex on
|
||||||
|
## the helper regardless of whether that vertex was collapsing, which ballooned
|
||||||
|
## parts of the thigh to 167% while the worst-collapsing vertices (which are not
|
||||||
|
## on the helper at all) did not move off 0.83. Per-vertex correction is what
|
||||||
|
## that idea needs, and a bone cannot express it.
|
||||||
static func update(skeleton: Skeleton3D, driven: Array) -> void:
|
static func update(skeleton: Skeleton3D, driven: Array) -> void:
|
||||||
for d in driven:
|
for d in driven:
|
||||||
skeleton.set_bone_pose_rotation(d[1],
|
skeleton.set_bone_pose_rotation(d[1],
|
||||||
|
|||||||
Reference in New Issue
Block a user