0

Does anyone know how to define the vanishing point co-ordinate when creating a perspective effect using a CATransform3D transform? I've got the code working to rotate an image and see the resulting perspective effect added, but I need to be able to specify where the vanishing point is, and this seems to be some default parameter that is not modifiable. I've searched far and wide and am coming to the conclusion that maybe this isn't possible, and requires me to look at OpenGL instead. Appreciate any help. Cheers.

gforce
  • 1
  • 1

1 Answers1

0

I think what you need is the anchorPoint on the layer. Try changing that to a value between 0 and 1:

self.layer.anchorPoint = CGPointMake(0.25, 0.25);

Hope that helps! :)

Charles Menguy
  • 40,830
  • 17
  • 95
  • 117
user1081465
  • 61
  • 1
  • 5