On Jul 22, 2008, at 3:07 PM, Jens Alfke wrote:

When I implement this, I get the wrong results. It looks like the pieces do get rotated, but then they're projected flat onto the board layer, so when the board tilts back it's clear that it's still flat but with distorted pieces drawn on it.

As far as I can tell I'm doing everything correctly. Now I'm worried that there's some undocumented limitation in CA itself that prevents a layer from lying in a different 3D plane than its superlayer. Is that so? Any way to work around it?

It's unfortunate that this is undocumented, but it is the intended behavior—layers are projected into their parent's plane when rendered. This is because many of the features of the CA compositing model are inherently 2D (filters, drop shadows, etc) so the only way to make them work is for each layer to be a place in 3D space.

Typically the way one works around this is to make all layers that have to live in the same 3D space be children of the same parent layer, the one with the sublayerTransform defining the perspective and viewing transform.

        John


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to