So right now I have it so that when the player is looking at an object he can pick up, and the player presses the left-mouse button, he picks that object up. I also want to be able to rotate that object using the scroll wheel, the code for that is here:
if (Input.GetAxis("Mouse ScrollWheel") > 0) {
transform.Rotate(Vector3.left * 0.5f, Space.Self);
}
if (Input.GetAxis("Mouse ScrollWheel") < 0) {
transform.Rotate(Vector3.right * 0.5f, Space.Self);
}
the PROBLEM is that I want to be able to rotate that object to the right IN ACCORDANCE TO WHICH SIDE THE PLAYER IS LOOKING AT, and NOT the object’s own space and also NOT in the world space but which side the PLAYER is looking at, so that no matter which side the player looks at the object, the object ALWAYS rotates to the right (or left if the player scrolls the scroll wheel down). A visualization for what I want to do can be found here: