Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity ar scale

ARSessionOrigin arSessionOrigin = FindObjectOfType<ARSessionOrigin>();
float contentScale = /* inverted (?) scale factor for the object */;
Transform objectToScale = /* parent transform for what you are scaling */;
arSessionOrigin.MakeContentAppearAt(objectToScale, objectToScale.position);
arRootObject.transform.localScale = new Vector3(contentScale, contentScale, contentScale);
Source by forum.unity.com #
 
PREVIOUS NEXT
Tagged: #unity #ar #scale
ADD COMMENT
Topic
Name
5+8 =