An elderly dog walker who was fatally injured in a park hit a boy on the back of his legs with a shoe and raised his arms in a “slapping motion” at a girl, a murder trial has heard.