I had a similar experience with my M&P9FS when it was new - even had a casing wedge between my eyeglasses and my temple! Those things are HOT! This tendency decreased with round count, and after a few hundred rounds it settled in at depositing everything about 3-4 feet to my right. Think of the 'break in process' as a good excuse for more range time.
Run more rounds through it to see if it breaks in.
If not, call or fill out the s&w warranty form online. Their customer service is AWESOME. They'll send you a shipping label, you ship it to them, and in a couple weeks, you'll get it back running like it should. I went through this warranty process for my m&p shield, it was very painless, and now my shield is running like a top.
another vote for shoot more through it. my fs9 did the same thing. 3rd shot landed on my glasses and burnt my eye brow. the rest of the 100 rounds I shot ended up in my hood. after shooting it another 100-200 rounds I no longer had the problem