how to stop relative motion between gear and shaft? as shaft rotate....the gear should rotate...so for that what are the constraints to be given between them?

mostly pin & slider constraint