Nerve damage. Always hard for an MD to determine ... but easier for an Orthospinology Chiropractor to correct ... Orthospinologist Chiropractic, not just a Chiropractor.
First do the 20 minute heat, 20 minute ice, 20 minute nothing a few times ... if it doesn't get better, you need to call either the MD or the Orthospinologist. Good luck.
You need to get to the doctor asap. You could have ruptured a tendon. There are so many tendons and ligaments that can be hurt in basketball and if not addressed your basketball playing could be over if not looked at. At least have it addressed properly by a physician. You may need to get an MRI so the soft tissues can be looked at. Don't mess with it and act like it didn't happen because it can only get worse. Your Knee cap is held in place by several tendons and ligaments that are so important. Did you hear a pop? If so that makes it even worse and an emergency.
Go get some help.