Hi I have a system where an object’s child has to face a target I require the entire object to be rotated so the child is facing the target but cant seam to work out the correct quaternion combination. I currently have this which seams to work fine except in some odd circumstances.
transform.rotation = Quaternion.RotateTowards(transform.rotation,
transform.rotation * Quaternion.FromToRotation(
child.transform.forward,
target.position-child.transform.position)
,temprotspeed * Time.deltaTime);
I know I basically need to apply a rotation that is zero when the child is facing the object but cant seam to work it out…and im sure its something rather easy…
Any help would be appreciated