How to make an object move to a constante position while rotating?

How to make an object like a ball rotate to the left at the same y position ( a 2D game ) while this ball rotates clockwise, without changing it’s position y with a fixed rotation?

Have the ball be a child of a GamebObject.

Apply a translate script to the parent and a rotating script to the ball.

That’s one of a bajillion ways to do it.

greekdude247

This hint you gave me was the first thing I did yesterday!
But thanks anyway!!

I needed to know if there is a way even using itween to constantly move towards and rotate at some speed without changing the Y direction but without using a child and a parent objects.

I think this is more complicated because amking only one object do all the movement needs to recalculate all the time the X and Y rotation angles and apply some gradative values to not let the object change direction, while rotating of course.

but forget it I already had the answer all the time implemented, but I wanted to have only one object running this because it will have a large HP and I have done this :

removed the collider from the child ( that rotates) and the invisible parent moves to the left dragging the child and calculates the variable AsteroidHP , so when it reaches 0 or if the parent passes a world camera point if realocates it´s position again…at some point I have checkpoint to stop the process for midbosses and bosses events!

But Thank you my friend! I can see you thought the same :slight_smile: