unhoused man’s mental illness became a central issue in determining whether he “intended” to commit a crime