Z axis support to view an UIView

I want to place an UIView in Z axis forward from the main camera view. I have added code like below. I am trying with CATransform3DTranslate, but JAPanoView (its an uiview) doesn't display in Z axis value mentioned to be in forward to the camera view. Could someone please advise, how can i achieve it?

    -(void) initializeScene {

    // Create the camera, place it back a bit, and add it to the scene
    CC3Camera* cam = [CC3Camera nodeWithName: @"Camera"];
    cam.location = cc3v( 0.0, 0.0, 12.0 );
    [self addChild: cam];

    // Create a light, place it back and to the left at a specific
    // position (not just directional lighting), and add it to the scene
    CC3Light* lamp = [CC3Light nodeWithName: @"Lamp"];
    lamp.location = cc3v( 0.0, 40.0, 0.0 );
    lamp.isDirectionalOnly = NO;
    [cam addChild: lamp];

    // JAPanoView IS AN UIVIEW
    JAPanoView *panoView=[[JAPanoView alloc] initWithFrame:CGRectMake(0, 0, 768, 1024)];
    [panoView setFrontImage:[UIImage imageNamed:@"Home_front.png"] rightImage:[UIImage imageNamed:@"Home_right.png"] backImage:[UIImage imageNamed:@"Home_back.png"] leftImage:[UIImage imageNamed:@"Home_left.png"] topImage:[UIImage imageNamed:@"Home_up.png"] bottomImage:[UIImage imageNamed:@"Home_down.png"]];

    CATransform3D _3Dt = CATransform3DIdentity;
    _3Dt = CATransform3DTranslate(_3Dt, 0, 0, -30);
    panoView.layer.transform = _3Dt;

    [[[CCDirector sharedDirector] openGLView] addSubview:panoView];

    // Create OpenGL ES buffers for the vertex arrays to keep things fast and efficient,
    // and to save memory, release the vertex data in main memory because it is now redundant.
    [self createGLBuffers];
    [self releaseRedundantData];


The z-order of UIViews is the order of them in their superview's subviews property. To have on subview in front of another you can user you can simple addSubview them in the correct order, place them in the XIB file in this order or use bringSubviewToFront.

Need Your Help

CountDownTimer wont let me call onDestroy

android sdk ondestroy countdowntimer

I have made and simple countdown timer app, but when i try to make onDestroy to cancel countdown timer i get and error.

Can not connect to local PostgreSQL

ruby-on-rails osx postgresql

I've managed to bork my local development environment.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.