This article studies 3D formation building in three dimensional spaces by a team of mobile robotic sensors. The multi-agent system consists of mobile robotic sensors defined by the three degrees of freedom kinematics equations with the constraints on their linear and angular velocities. First, we propose a distributed consensus-based control algorithm for the mobile agents which result in forming a desired geometric configuration in 3D environments. Then, we present a decentralized random motion coordination law for the mobile robotic sensors for the case when the agents are unaware of their positions in the configuration in three dimensional environments. The proposed algorithms use some simple consensus rules for motion coordination and building desired geometric patterns. Convergence of the mobile agents to the given configurations are shown by extensive simulations. Moreover, performance of the proposed control laws have been proved mathematically.