This article shows how to control scenes on a Unity application by a Windows application with NamedPipe like the following demonstration. The full source is on the GitHub repository.Continue reading "Controlling Unity Application Through NamedPipe"
Updated on 2021-09-06: This article was largely revised to take into account the rotation of the attached game object and the direction of the CapsuleCollider.
You can use
Physics.OverlapCapsule to get the two Colliders overlapped with the CapsulCollider as above. This method takes the position and the size of a capsule and returns all Colliders overlapped by the capsule.