Rotation problem in contructing arm with parent / child reloation (forearm move way faster)
I am constructing a simple avatar using cubes. an arm is constructed by 2 cubes, in this parent-child manner:
arm - forearm
I am using some other controller to control each rotation by given quaternion to it, they should have same quaternion so when I put my hand up, the arm and the forearm should be linearly pointing up. however the forearm will go way faster. I found that it is a problem of using parent child relationship, but I have no idea how can solve this. Does anyone have any experience on this? Thank you. This is the code I used: Quaternion target = new Quaternion(BodyPartQuat[1], BodyPartQuat[2], BodyPartQuat[3], BodyPartQuat[0]); BodyPart.transform.localRotation = Quaternion.Slerp (BodyPart.transform.localRotation, target, Time.deltaTime * speedFactor);