Terug
· 1 min leestijd
Follow controllers
follow3d and follow2d pull a body to a node's pose with rapier's PD or PID controller, and a ragdoll can chase its clip.
- Dragos Balaur
follow3d and follow2d pull a body to the pose of another node every fixed step, with the PD and PID controllers rapier ships.

targetnames the node.position_gainandvelocity_gainare per axis, 60 and 0.8 by default, which closes a gap in about one step.rotation_gainandspin_gainturn the body too.translation_axesandrotation_axessay what is pulled; in 2Dfollow_rotationis the one turn.kind = "pid"addsintegral_gain: the gap summed over time pushes back against a steady force. In the picture both cubes haveposition_gain0.3, and only the PID one holds against gravity.- The sum is in the snapshot, so a rollback pulls the same way.
node.follow3d.reset_follow()forgets it. - A ragdoll built with
drive: "follow"puts a follow on every body, aimed at its bone, so the bodies chase the animation. Itsfollowtable takes the same keys.
[nodes.follow3d]
target = "/World/Hand"
kind = "pid"
integral_gain = [1.0, 1.0, 1.0]