follow3d component
Pulls the node's body3d towards the pose of target every fixed step, with rapier's PD or PID controller. node.follow3d.reset_follow() forgets what a PID…
3d · physics · 12 properties · 3D
Pulls the node's body3d towards the pose of target every fixed step, with rapier's PD or PID controller. node.follow3d.reset_follow() forgets what a PID summed.
In a scene, follow3d is the node key that applies it. A script reaches each property below as a field on node.follow3d: reading one asks the running component, and assigning one leaves the rest alone. The whole table is node.follow3d.get() and node.follow3d.set(table).
Properties
| property | type | default | description |
|---|---|---|---|
integral_gain |
vec3 | [1,1,1] |
How hard the gap in position summed over time pulls, per axis, with pid |
kind |
enum | pd |
Rapier's proportional-derivative controller, or the same with an integral that keeps pulling against a steady push One of pd, pid. |
position_gain |
vec3 | [60,60,60] |
How hard a gap in position pulls, per axis: about one over the fixed step closes it in one step |
rotation_axes |
flags | ["x","y","z"] |
The axes the body is turned about One of x, y, z. |
rotation_gain |
vec3 | [60,60,60] |
How hard a gap in rotation pulls, per axis |
rotation_integral_gain |
vec3 | [1,1,1] |
How hard the gap in rotation summed over time pulls, per axis, with pid |
spin_gain |
vec3 | [0.8,0.8,0.8] |
How much of a gap in spin a step corrects, per axis |
target |
node | — | The node whose pose the body is pulled to; empty pulls nothing |
target_angular_velocity |
vec3 | [0,0,0] |
The spin the body is pulled to match about each axis, radians a second in the file |
target_linear_velocity |
vec3 | [0,0,0] |
The velocity the body is pulled to match, in world units per second |
translation_axes |
flags | ["x","y","z"] |
The axes the body is pulled along One of x, y, z. |
velocity_gain |
vec3 | [0.8,0.8,0.8] |
How much of a gap in velocity a step corrects, per axis: 0 none, 1 all of it |
Script functions
Methods of node.follow3d, the handle a node carrying this component exposes. Every handle also has get(), set(table), patch(table), has() and remove().
From physics3d:
| method | what it does |
|---|---|
reset_follow() |
Forget what a pid follow summed, so it pulls from now as if it had just started. |