Why does my right knee cap top right corner hurt badly when I hit it on the corner of the wall it is warm and hurts a lot I don t even have to move it for it to ache its also very sore and to touch can someone tell me maybe what I have done?

X-rays required. If you are lucky, you just bruised the bone. However, you need to see a doctor to get some x rays to make sure you didn't fracture your patella (knee cap). Another, less likely cause is that you have a bipartite patella that is now inflammed. To find out what this is- go see an orthopedic physician.