It depends on the chameleons character. Every animal is different. My veiled needed 1 hour to get used to the new place and i often take him out so he can get sun and he has no problem dealing with new places, but he has hard time with me he doesnt like me a lot.
Just give him some time he will get used to the new place eventually