Reputation: 185
I have component which is been created in 3D shape. to this component I would like add a button. Since component is created in 3D view, if I add component into the 3D view,button won't show up.
After digging many API, I came across with transform and Matrix.
As per my understanding, I have followed this approach
1) From 3D view component, got matrix object
eg: var matrix2D:Matrix = transform.matrix
;
2) then applied, this matrix to button transform
eg: var button:Button = new Button();
button.transform.matrix = matrix2D.
it did not worked, Am I following right approach. pleas guide me
Thanks
Upvotes: 1
Views: 106
Reputation: 32221
You need to convert your button to 3D object and place it in the same way you place the first one.
Upvotes: 1