Date: 202106
Local time of day: 1201-1800
Location: ZZZ.Airport, US
Flight conditions: VMC
Weather elements / visibility: 10
Light: Daylight
Aircraft: Skyhawk 172/Cutlass 172
Operating under: Part 91
Flight plan: VFR
Mission: Personal
Flight phase: Climb
Airspace: Class C ZZZ
ATC / advisory: Tower ZZZ
Second aircraft: J3 Cub
Reporter organization: Personal
Reporter function: Pilot Flying; Single Pilot
Reporter qualification: Flight Crew Private
Human factors: Communication Breakdown; Situational Awareness
Second reporter function: Traffic Management
Anomaly: ATC Issue All Types; Conflict NMAC; Deviation - Track / Heading All Types; Deviation / Discrepancy - Procedural Clearance
Detector: Person Air Traffic Control; Person Flight Crew
When detected: In-flight
Result: Air Traffic Control Provided Assistance; Flight Crew Took Evasive Action
Contributing factors: Procedure; Human Factors
Primary problem: Procedure

Narrative: After taking off of Runway XXL at ZZZ; I turned 15 degrees left of the runway (per policy at ZZZ) and continued climbing. ZZZ Tower began giving me instructions to enter the pattern for left downwind XXL and I requested to return to ZZZ1. ZZZ Tower instructed me to fly a 150 heading. As I was flying on the 150 heading (I believe that I may have drifted 10 degrees off- closer to 160 heading) I saw a Piper Cub roughly a mile out and it appeared to be turning to my right; but coming straight at me still. After watching the plane; and still continuing my climb; I saw it coming directly at me (as far as human factors; the last image I remembered of the plane was it turning to my right and coming at me) so I chose to dive left immediately instead of right. Looking out the right window I was able to see the plane very clearly Turing left as well; so I steepened my dive down and to the left (after talking to a ZZZ Tower Supervisor named NAME; I found that the plane was in a 45-degree turn to join the left downwind for Runway 20L).As my adrenaline had kicked in upon seeing the plane coming at me and being left with no choice besides taking evasive action; I had missed a radio call from ZZZ Tower to turn right 20 degrees. After flying under the Piper Cub; tower explained that I was off my 150 heading instead of making a comment on the near miss; so I exclaimed that I was off my 150 heading because the plane almost hit me. Tower seemingly dismissed my comment and reiterated that I was to comply with the 150 heading immediately and I apologized and returned to the heading.Regardless of my adrenaline (which was very high for several hours after my landing at ZZZ1) I took what information I had; as I had previously seen the plane turning to my right and had to take evasive action and dive down and to the left.The inaction of ZZZ Tower in providing me or the other plane with information about each other is the most astonishing part of this event. In any pattern at a towered airport; even my times at busy ZZZ; I have always been advised if I was even within two miles of another plane in the pattern. Therefore; not being warned that another plane was on a close collision course with me would have led to a mid-air collision had I not been looking for a plane heading my direction. Even if I had been precisely on a 150 heading or if I had been 30 degrees off of the heading; I would have been on a course for a mid-air or a near miss like I had today. Upon talking with the ZZZ Tower Supervisor; he admitted that the cub had performed a non-standard pattern entry with the sharp 45-degree bank entry into it. While I do not blame the pilot of the cub; I do believe that if sharply banking into a pattern is enough to cause a near miss event; that plane and my plane should NEVER have been that close to each other.I do; however; blame the Controller in a large part; as it becomes clear that he catches his mistake when he exclaims to the cub that the traffic is one mile away and quickly tries to offer separation; but it is too late and I am too focused on trying to avoid this plane coming at me/across my field of view.Ultimately; I believe that the Controller's inaction and lack of communication with both planes is what allowed this event to occur.


Second narrative: Aircraft X was instructed to fly heading 150; vectors for traffic. Prior to this instruction being given; Cessna 172 has requested flight following which was on a East bound heading. The reason that this vector was given was because of a Piper Cub; Aircraft Y; was inbound making left traffic for Runway XXL.I was busy issuing doing other things such as issuing wake turbulence calls and getting visual separation between aircraft on final for the parallel runway; I realized that Aircraft X was veering to the left; turning East bound. I immediately tried to correct the situation by instructing Cessna 172 to turn right 20 degrees.By this point it was too late and the Cessna had turned right into the path of the Piper Cub that was descending. I immediately issued traffic to the Piper Cub. I inquired Aircraft X about his heading to which he replied 'Yeah I was flying heading 150 but there was a plane there so I turned left to avoid.' The 150 heading exists to keep aircraft away from these exact situations. Aircraft X was an unfamiliar pilot and needed extra attention. I was busy engaging in other duties to notice that he had turned left East bound.


Synopsis: C172 pilot and a Tower Controller reported the C172 pilot turned the wrong way during an evasive action for traffic.