An improved tracking method for ornithopters in perching scenario is presented. Based on previous works, this article develops a model-based approach for the lateral controller of the ornithopter. The paper shows how a simple dynamic model can be used to track autonomously a target point in a constrained confined space, that requires accurate and fast maneuvers. The lateral control follows a cascade architecture to transform the actuator movement, which for this kind of platform is the deflection of the vertical tail, into an effective trajectory tracking in the horizontal plane. Results show an improvement in the accuracy of the perching maneuver, reducing the errors in the horizontal plane from the perching position to the target point, the center of the branch in this case. In addition, the improved lateral control allows the ornithopter to reach the perching objective from different initial positions and directions, so it can perform a real 3D perching, compared to the previous experiment where the launching direction was aligned with the branch. This new controller can also be implemented for 3D trajectory tracking, leading to a complete ornithopter-based autopilot architecture.