Hi,
I’m moving an object using AddForce in a particular direction and rotating the transform using this:
var mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
Quaternion rot = Quaternion.LookRotation(thisTransform.position - mousePosition, Vector3.forward);
transform.rotation = rot;
transform.eulerAngles = new Vector3(0, 0, thisTransform.eulerAngles.z);
My object has a child object which moves with it. However, I’d like the child object to be in the same position as the parent object but have a different rotation that I can move separately. Is there a way to do this?
One idea I had was removing the child completely but I’m concerned that as these are both moved via physics, they could separate their positions.
Thanks for any help