Making sure direction vector gets clamped to a maximum angle.