Hi everyone. Is there a way to have an object “mirror” another object using scripting? Thanks.
2 Answers
2var otherObject : Transform;
function LateUpdate () {
transform.position = otherObject.position;
transform.rotation = otherObject.rotation;
transform.localScale = otherObject.localScale;
}
Add it as a child of the first object in the inspector or through code.
Yes, but how would I do it in code?
– Red_Sentineltransform.parent = add that to the object you are going to have mirror and then just add the object you are mirroring on the right side.
– dendens2