Rotate Around with finite angle/Eular Angles

I’m extremely new to coding and I’m struggling to wrap my head around some code I’m writing. I’ve basically got an RPM meter that is responding to an RPM variable. I’ve got the RPM needle, with a child right in the centre of it that it rotates around.

This code gets it to rotate around the child fine, but it keeps rotating - it won’t stop spinning around the pivot point, just goes quicker or slower dependent on the revs:

transform.RotateAround(centerP.transform.position, Vector3.up, rpmS/50);

This code does the opposite - it doesn’t rotate around the child at all, but around the gameObject’s pivot point. It does however rotate back and forth with the revs variable:

transform.rotation = Quaternion.Euler(0, rpmS/50, 0);

I’m trying to combine the two, but it’s driving me mad - any advice?

Thanks

Use the second one. Put your needle as the child of an empty parent. The parent’s pivot point should be around which you rotate it (and the parent is the one you rotate), and the needle is offset by however far it needs to be.

That’s because those functions do complete different things.
First one adds values to object position to emulate rotation around other object, this gives you a continious rotation.
Second sets the angle of rotation to thet given value, erasing what was there before.

To make nice odometer you want arrow sprite with pivot at bottom and second way.

That’s got it - thank you so much.