update rotate and pos