diff --git a/src/Mono.cs b/src/Mono.cs index b0f8ad6..982a655 100644 --- a/src/Mono.cs +++ b/src/Mono.cs @@ -68,10 +68,13 @@ static class Mono } } else - { - bool in_dist = Vec3.Distance(Rig.r_con_stick.position, box_pose.position) < 6 * U.cm; - held.Step(in_dist && Rig.btn_grip.state); - if (held.state) + { + in_dist.Step(Vec3.Distance(Rig.r_con_stick.position, box_pose.position) < 6 * U.cm); + bool pickup = in_dist.state && Rig.btn_grip.delta == +1; + in_cone.Step(Vec3.AngleBetween( + Rig.head.orientation * Vec3.Forward, + Vec3.Direction(box_pose.position, Rig.head.position) + ) < 15.0f); { box_pose.position = Rig.r_con_stick.position; }