protected override void PlaceImagePlane() { base.PlaceImagePlane(); if (ImagePlane != null && ArucoObject != null) { var scale = ArucoObject.GetGameObjectScale(); ImagePlane.transform.localScale = pixelsToMetersFactor * new Vector3(scale.x, scale.z, scale.y); } }
/// <summary> /// Places, rotates and scales the image plane. /// </summary> protected virtual void PlaceImagePlane() { if (ArucoObject != null) { var scale = ArucoObject.GetGameObjectScale(); ImagePlane.transform.SetParent(null); ImagePlane.transform.localScale = new Vector3(scale.x, scale.z, scale.y); // Because it's rotated up ImagePlane.transform.SetParent(transform); } ImagePlane.transform.localPosition = Vector3.zero; ImagePlane.transform.forward = -transform.up; // Rotated up }