How do I apply a perspective transform to a UIView and add to cocos2d
i have made this code to add a webview to cocos2d layer, the webview is added but the webview is not "rotated on y", but scaled on x... the text is perfectly orizontal...as if there is no perspective matrix, but isometric... what error i'm doing?
Code:
UIWebView *creditsScroll=[[UIWebView alloc] init];
[creditsScroll setUserInteractionEnabled:YES];
[creditsScroll setBackgroundColor:[UIColor cyanColor]];//[UIColor clearColor]];
creditsScroll.opaque=YES;
creditsScroll.frame=CGRectMake(0, 0, 300, 600);
[[[CCDirector sharedDirector] openGLView] addSubview:creditsScroll];
[creditsScroll loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"iCD_credits_it" ofType:@"html"] isDirectory:NO]]];
CATransform3D _3Dt = CATransform3DRotate(creditsScroll.layer.transform,1.14, 0.0, 1.0,0.0);
creditsScroll.layer.transform=_3Dt;
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| How to get a UIView color of a perticular pixel(x,y)? | ravi124 | 1 | 3,993 |
Mar 24, 2009 08:51 PM Last Post: Holmes |
|
| Have Hierarchical Sprite Tree, Need To Transform Screen X,Y To Determine Which Sprite | kalimba | 5 | 5,229 |
Mar 16, 2009 06:31 PM Last Post: AnotherJake |
|
| Camera Following Object (3rd Person Perspective) | squidgee | 1 | 2,394 |
Nov 30, 2003 11:58 AM Last Post: ERaZer |
|

