Is there a way to keep the sprite rotation in place without a parent

Hi everyone,

My problem is very simple, my whole code is composed of very small parts, which makes it very maintainable and easy to use, but now I’m facing a problem, I have a rotation method which only function is rotate the given object:

        public static void RotateObject(GameObject currentObject, float speed, float rotationAngle, int direction)
        {
            var value = Time.deltaTime * rotationAngle * speed * direction;
            currentObject.transform.Rotate(0, 0, value);
        }

The method works great but it obviously rotates the sprite too, now I would like to update it to keep the sprite in place but to rotate the object, I know that the most common method is create a parent, freeze the child rotation and rotate the parent, the problem is that this object is being used with other methods that require other components, including the animator, and it would be a mess, plus I only have one element in the entire game using the rotation method so update the whole code to handle this specific situation for this specific element does not make me happy, I would love to create a little solution that can be easily applied to this specific element some sort of “FreezeThisSpriteRotation(GameObject thisGameobjectWillNotRotateItsSprite)” method, I even thought that, knowing the rotation value, I could rotate the sprite in the opposite angle,keeping it in place , but I could not find anything about sprite rotation in the unity documentation beyond the flip ‘x’ and ‘y’

so my question is: is there a way of rotating the object but keep the sprite rotation in the original place without have to create a whole new object and set it as parent, just like doing a “flip x” and “flip y” flips the sprite without affect its rotation at all but to keep it steady instead.

All components, such as SpriteRenderers, are just scripts that give GameObjects functionality.
A SpriteRenderer cannot be moved because, well, “moving” is not really a thing that scripts do.

A way that I approach a similar problem in my application is by making these two objects siblings of another parent object, and using a simple “Follower” script to make one sibling follow the other sibling by setting its position equal to the other’s position.

This gives the illusion that they’re part of the same object, while allowing them to move independently from each other.

thank you for your suggestion, it looks like I cannot get the result that I want without end up with an empty extra object