Hello, I am struggling to do this correctly. I have a 2d sidescroller and I want an object to rotate on one axis (normal to the mobile device screen) and point towards the touch input. Can someone help me with the logic required? I have the variables for the axis origin and i am correctly updating the variable for the location of the touch input, I just don’t know the necessary scripting to tell the axis to rotate towards the touch input location around the axis origin. Is there a way to rotate something towards a vector2d because I am getting the correct vector2d from the axis origin to the touch input, I am just not sure how to correctly update the delta rotation on the component to point in the direction of the vector2d. Screenshot attached. Thanks for any help!
