The most common cause of ambient air coming out the vents and not heated air is a bad temperature blend door motor stuck in the cold position. Sometimes you can get it free by turning the temp dial back and forth from heat to cold and putting the air path to floor. Otherwise it may just need replacement. Less common is for the heat/ac control itself to go bad. Try verifying that the air paths are all working by placing it on floor, then feel air only blowing on the feet and nothing out the dash or defrost vents, repeat for dash vents, then defrost.
When you stated the ac works when cold, if you meant you can visually see the compressor pulley turning, this is normal as our vehicles use a variable stroke compressor instead of a traditional magnetic clutch compressor. So instead of just a compressor that is either off or on (100% engagement and freon circulation), the computer can engage the compressor based on temperature and freon pressure and vary the need from 0% to 25% to 50%, etc based on demand. This helps our engines get better fuel economy. So even though you may see the compressor pulley spinning in the dead of winter, internally the computer can set it to zero stroke, essentially letting it freewheel.