First, I am trying to design a simple space-sim, which doesn’t seem to be so simple in fact.
Second, let me show you a picture.

Fig(A): It is a my gameplay view.
Fig(B): Scene view with World/Local positioning of my gameobject.
Fig(C): Let’s skip this for now as I will explain it in due time.
Chart: A Hierarchy chart where 4 gameobjects are child of one single gameobject.
Now, onto my problem:
I have this code:
public class mouseTurn : MonoBehaviour {
public float speedmultiplier = 0.005f;
void FixedUpdate(){
float xvalue = Input.mousePosition.x;
int screenwidth = Screen.width;
float xmidpoint = screenwidth/2;
constantForce.relativeTorque = new Vector3(0f,(xvalue-xmidpoint)*speedmultiplier,0f);
}
}
This script is attached to my “Main GameObject”(which also has a RigidBody/ConstantForce attached to it), which enables the entire hierarchy to rotate, which is working absolutely fine[I ommited a lot of code(ex. Y-Axis rotation) and other things to make my question precise and onto point].
What I want to accomplish is that when ever I rotate my object, the child object “Capsule” should rotate just a small amount, to the right/left of my camera, in Time t as to show the effect of capsule turn(For relevance: check Freelancer/Black Prophecy gameplay)[As shown in Fig(C)].
I tried using Quaternion Slerp but could not figure out a way to achieve said goal. While using quaternion slerp, my “Capsule” would not rotate along with camera.
If you see my previous post, you can see that I was able to achieve a fluid rotation using “ConstantForce”, which you can also see in the give code. Since, I have optimized the said code a lot(i.e why I have only posted a snippet of it).
So if any Unity Gurus are out there who can help me with my dilemma, I would be very thankful(Atleast show me a path to a solution).