Problem with lookAt only Y axis and Rotation on x axis

Hi, I’m trying to write a script for a ball object. I want the ball to look towards an object such as a square and rotate around the X-axis all the time.

I don’t know how to make this ball rotate all the time in the direction of the square, it’s all about continuous rotation of 360 degrees. Any suggestions?

There’s a transform method called ‘RotateAround’ which does exactly what you’re asking for.
You can set the target pos, rotation axis, and the speed.

Any ideas?

The problem was solved… all I had to do was give up Euler’s angles