Hi everyone who reads this! I have a gun mesh that is supposed to rotate when you move your mouse and stuff. It all works find and dandy, except the pivot point is were I would want it to rotate. Here’s the section of my script that does the rotating.
transform.position = cameraObject.transform.position + (Quaternion.Euler(0,targetYRotation,0) * Vector3(holdSide * racioHipHold, holdHeight * racioHipHold, holdZ));
targetXRotation = Mathf.SmoothDamp(targetXRotation, cameraObject.GetComponent(MouseLookScript).xRotation, targetXRotationV, rotateSpeed);
targetYRotation = Mathf.SmoothDamp(targetYRotation, cameraObject.GetComponent(MouseLookScript).yRotation, targetYRotationV, rotateSpeed);
I’m need it to rotate farther back on my gun. How would I go about doing this? I’m new to unity so this might be a noob question, but i hope somebody can help