Log in or register to post comments

Zero scale of dynamically created object (CloudReco)

January 17, 2016 - 12:11pm #1

Hello, I'm creating object from prefab when the image from Cloud is recognised, but doing it makes object very small. It's like the parent has no scale. Modifying the value of scale doesn't make change. Here's code:


Transform m_Text = Instantiate(m_TextPrefab) as Transform;
        m_Text.parent = mTrackableBehaviour.transform;
        m_Text.localPosition = Vector3.zero;
        m_Text.localRotation = Quaternion.identity;

        float targetSize = mTarget.searchResult.TargetSize;
        m_Text.transform.localScale = new Vector3(targetSize, targetSize, targetSize);


Doing same with static object attached to Image Target works. Thanks in advance for help.

Log in or register to post comments