Separated shape logic from rigid body.