Skip to main content
February 26, 2012
Question

local3DToGlobal sets transform.matrix3D property

  • February 26, 2012
  • 1 reply
  • 836 views

when displayObject.local3DToGlobal(Vector3D) is used, the transform.matrix3D property of this object will be set.

This is not really desirable. objects with the transform.matrix3D property set have worse performance,especially on mobile devices. Exactly for this reason it makes often sense to do the 3D math oneselves instead of relying on the transform.matrix3D property. The local3DToglobal function is useful - however, using it shouldn't change anything about the matrices of the objects.

how to reproduce the problem:

create a new project and in the first frame of the timeline put:

import flash.geom.Vector3D;

trace(this.transform.matrix3D); //null

this.local3DToGlobal(new Vector3D);

trace(this.transform.matrix3D); //[object Matrix3D]

This topic has been closed for replies.

1 reply

chris.campbell
Legend
February 29, 2012

Could you please open a new bug report on this over at bugbase.adobe.com?  Please post back with the URL so that others affected can add their comments and votes.

I'll also forward this to the 3D team for their review.

Thanks,

Chris

chris.campbell
Legend
March 2, 2012

Just to follow up, you might have already figured this out.  But this is as designed, as soon as you do anything 2.5D with a display object we have to create a Matrix3D.

Chris

March 2, 2012

But it doesn't make sense. There is no necessity to set the Matrix3D property of the object to perform this calculation and will only have adverse performance implications.