Swarms of indoor flying robots are promising for many applications, including searching tasks in collapsing buildings, or mobile surveillance and monitoring tasks in complex man-made structures. For tasks that employ several flying robots, spatial-coordination between robots is essential for achieving collective operation. However, there is a lack of on-board sensors capable of sensing the highlydynamic 3-D trajectories required for spatial-coordination of small indoor flying robots. Existing sensing methods typically utilise complex SLAM based approaches, or absolute positioning obtained from off-board tracking sensors, which is not practical for real-world operation. This paper presents an adaptable, embedded infrared based 3-D relative positioning sensor that also operates as a proximity sensor, which is designed to enable inter-robot spatial-coordination and goal-directed flight. This practical approach is robust to varying indoor environmental illumination conditions and is computationally simple.Keywords Relative positioning sensing · Indoor flying robots · Collective operation · 3D sensor · Spatial-coordination · Proximity sensing J.F.R. developed the concept of relative positioning sensing for enabling goal-directed flight on indoor collective flying robots, wrote the manuscript, developed the sensor hardware/firmware, developed the calibration tools and characterised the sensor. T.S. extensively contributed to the sensor firmware and characterisation. J.-C.Z. and D.F. conceived and directed the project sponsoring the work described in the article. They also provided continue support and feedback towards reaching the attained results.