How could I rotate an object relative to its movement on an axis?
I am trying to make a simple game that is basically just bouncing a ball on a paddle. I have a script that lets me grab my paddle and move it around to hit my ball, but I want for as the ball moves right along the x axis for it to rotate and as it moves left on the x axis for it to rotate the opposite way. I am really struggling to think about how i can do this. I feel like I am just having a block, I thought it would be simple but i cant really think of anything. The main thing is I want it to be consistent so that when the paddle is at x 0 there is no rotation to it. If you can think of anything let me know!
Are you working in 2D or 3D? Also it's not clear exactly what you mean - I think I get the general idea, but you want spin relative to the orientation of the paddle? Is the orientation of the paddle always the same, or it can spin as well?
if you could make a quick drawing illustrating of what you want that would help.
What you want to do is probably very easy, but it depends on what system you are working in and a clearer idea of what you are talking about.