Heyo! I have been having some issues rotating a model of mine. The main body/HumanoidRootPart rotation is successful, however when it comes to the upper body’s rotation, that is where issues arise. I have been trying to fix it, however I can’t really begin to understand how.
To explain it simply, I have a tank model that has 2 parts, the HumanoidRootPart or lower body and the upper body. The lower body moves depending on where the player wishes to go and it faces the direction of movement. For instance, when the player taps “D”, the lower body faces to the right and so on. The Upper Body rotation is based on the mouse, it always faces the mouse position on the screen. That works, however it is where the issue lies.
Alright, so whenever I turn around the lower body of the tank, the upper body rotates with it, however it doesn’t align with the mouse position whenever turned. It only aligns with the mouse whenever the lower body is facing upwards. I have included below a video reference showcasing the issue at hand.
[-] https://gyazo.com/792ae3db7d27a61cb9e79c7618542a9f
I have tried searching everything on the DevForum, even asking for external help, however I wasn’t able to combat my issue. It is important to keep note that the Lower Body is connected with a Motor6D with the UpperBody and the LowerBody is connected with a Motor6D with a third part called Rotation, though that isn’t of importance.
Below is my code for the lower body rotation:
Basically all I am asking is, how do I rotate them individually without the systems breaking. Keep note that whenever the lower body turns, everything turns with it. I believe that could be the issue and I have to manipulate the C0 property of the Motor6D to achieve rotation only for the HumanoidRootPart. I appreciate your help.
Part0 → HumanoidRootPart/LowerBody
Part1 → UpperBody.
The Motor6D is called UpperBody and is a child of the PrimaryPart which is the HumanoidRootPart.
The second Motor6D is called RotationMotor:
Part0 → HumanoidRootPart/LowerBody.
Part1 → Rotation ( The third part that moves alongside the UpperBody with the help of a weld constraint)