A man accused of murdering a rough sleeper told a court he was "a little bit" high on cocaine at the time.
Alex Macdonald, 19, denied he and his co-defendants Charlie White and Jimmy Buckley deliberately set out to rob Razvan Sirbu, who was living in a tent.
The 21-year-old was found dead at the Loose Valley Conservation Area in Tovil, near Maidstone, Kent, on 7 May.
Mr Macdonald and Mr White, 19, deny murder. Mr Buckley, 20, has been found medically unfit to plead to the charge.
The jury at Maidstone Crown Court will not have to decide on the guilt of Mr Buckley, of Capell Close, Coxheath, only whether he "did the act".
Under cross-examination, Mr Macdonald, of Regency Place, Maidstone, said he and his co-defendants had gone out with the intention to steal, but they did not know about Mr Sirbu's tent.
He told the court that taking cocaine did not make him violent, and that he did not hit Mr Sirbu with a lump of wood - previously described in court as a tree branch - "as hard as I could".
Asked by Phillip Bennetts QC, for the prosecution, if it was obvious to him that Mr Sirbu, a Romanian, was injured, Mr Macdonald replied: "Yes, he was holding on to his side."
He denied that one of the reasons for the attack was because he "disliked foreign people".
"It was to defend us," he said, adding that it was "not really" an attack.
He claimed he started hitting Mr Sirbu after Mr White, of no fixed address, hit him with a meat cleaver, adding that he did not see Mr Buckley doing anything and did not see him with a weapon.
Mr Macdonald was also questioned about a string of previous convictions for violence, including robbery, battery, threatening to stab people, and two assaults on police officers.
The trial was adjourned until 2 January.