Has anyone got a bit of code I can use to change the center point DisplayObjects rotate around in a 3D space? I need it to work with rotationX, rotationY and rotationZ. I know theres a workaround of wrapping every object in aother sprite and offsetting the x & y positions but I'd much prefer a math solution.
As an example of the problem, this code should make a star shape:
var a=new Sprite()
addChild(a)
a.graphics.lineStyle(0,0xFF0000)
a.graphics.moveTo(10,10)
a.graphics.drawRect(100,100,100,100)
var b=new Sprite()
addChild(b)
b.graphics.lineStyle(0,0)
b.graphics.moveTo(10,10)
b.graphics.drawRect(100,100,100,100)
b.rotationZ=45
...
UPDATE: Thanks to Alex for the tip, I've posted a reusable solution here :)