update rotate and scale