swift - Can't add a 3D subview to the view of the controller -
I have a problem when I want to add a 3D subview in my controller view. I can not see 3D Sbwu println ( "Game")
viewDidLoad () function override {super.viewDidLoad () // Model cubeData = CubeData () / * go viewTest = UIView: GameControllerView class code (frame: self.view.frame) self.view = viewTest * / // 3-D view state to sizeScnView = CGSize (width: 350.0, Height: 350.0) to Centerview = CGPoint (X: CGRectGetMidX (self. view.frame) - sizeScnView.width / 2, Y: CGRectGetMidY (self.view.frame) - sizeScnView.height / 2) scnView = GameSceneView (frame: CGRect (original: Centerview, size: sizeScnView)) // add 3D View self.view.addSubview (scnView) // No user to manipulate the camera Mrs. gives the scnView.allowsCameraControl = true // show figures such as FPS and time information scnView.showsStatistics = false // Start Accelerometer self.motionManager = CMMotionManager () self.startAccelerometer () timer = NSTimer.scheduledTimerWithTimeInterval (0.4 target: subclass of self selector: selector ( "updateTimer"), userInfo: zero, repeats: true)} with this code I have my GameSceneView SCNView (3D visualization) But if I see the ViewTest variable (just below the cubeData) my GameSceneView is displayed, but my order Removal of comments without content for viewing the content
Question:. Why 3D subview controllers can not appear on the scene
EDIT: I have just seen how the 3D view controller view is behind the background how can I add my 3D view to the background included in the view controller. ?
If your supervisor rendered GPU- (a Drishyktha or Spraitkit scene), it Sbwugh were rendered GPU- Can be issues. One solution may be to present your view controller's view in a subview, so that your scnView has a sibling view on it, Use a related method for.
Comments
Post a Comment