It is legal to live in your car as it is your property but you have to be careful where you park your car at night. Some public places do not allow all night parking like a department store or a park
It is only legal to live in your car if it is parked on your own property or a friends property who is letting you have your car parked there. You cannot park in any city owned area.
It's fine as long as you do not park somewhere overnight that does not allow you to park there. Then you could potentially be arrested or kicked off the property for trespassing.
It isn't legal to live in your car if your car is parked in front of your house. But if you park your car somewhere else and it's in front of a private or public business, you can be punished for it.