I’m trying to implement a mechanic that allows a player to rotate an object by dragging the mouse on screen. However, being a rather… slow programmer, I don’t know where to start with this.
I sort of have the idea that I should track the mouse’s X and Y positions while the left mouse button is held down, but I don’t know how to convert the X and Y coordinates to an object’s rotation.
If anyone was wondering what exactly I’m talking about, I trying to let players examine objects close up the way Skyrim allows players to examine items.
Edit: I forgot to mention that I’m trying to program this in C#. While JS is helpful, it just doesn’t cut it.
That’s not helping at all. I tried implementing the code, altering it so it can be integrated and nothing. I looked up the script reference and I can’t seem to get anything working. Anyone else?