PhotoDune

rotationX and object height problem

111 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 1 000 and 5 000 dollars
  • Taiwan
savorks says

The idea was make a fake shape which have same 2D geom information with your source bitmap (can use transform.pixelBounds get the bound), put it into same display list as your source, and apply source’s Matrix3D (in case it is dirty already) to the fake shape.

After this, you can apply 3D transform like rotationX on the fake shape and get its 2D information like height, before you apply the transform to your source.

notice when DisplayObject in different display list, if it’s Matrix3D is dirty already, you will get different height/width information because it will effect by ancestor.

1494 posts
  • Sold between 50 000 and 100 000 dollars
  • Helped protect Envato Marketplaces against copyright violations
  • Microlancer Beta Tester
  • Exclusive Author
  • Has been a member for 3-4 years
  • Europe
  • Referred between 10 and 49 users
  • Bought between 50 and 99 items
Firsh says

Isn’t there some libraries that can do this like PV3D ?

by
by
by
by
by