Lange Posted April 11, 2017 Share Posted April 11, 2017 Hey I have just started on using babylon. I started using it together with your Unity exporter. I made the camera go from perspective to orthographics and I got a runtime error : Uncaught TypeError: Cannot set property 'orthoTop' of undefined In this line this._camera.orthoTop = n, as part of n.prototype.updateOrthographicSize = function() { if (0 !== this._orthoSize) { var e = this.scene.getEngine().getRenderingCanvasClientRect() , t = e.width / e.height , n = this._orthoSize , i = n * t; this._camera.orthoTop = n, this._camera.orthoBottom = -n, this._camera.orthoLeft = -i, this._camera.orthoRight = i } } , manager.js Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 11, 2017 Share Posted April 11, 2017 Hello! do you mind creating a repro case in the playground? Quote Link to comment Share on other sites More sharing options...
Lange Posted April 11, 2017 Author Share Posted April 11, 2017 I'm not sure about how I upload textures or .bablyon scene for playground except for sandbox, but on that site I can't seem to find the save button. I have narrowed the error down to only when i resize the window (for example when i open the chrome console that split the window it creates the error). Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 11, 2017 Share Posted April 11, 2017 Here is an example of external texture using rawgit: https://www.babylonjs-playground.com/#14VBAE#3 Quote Link to comment Share on other sites More sharing options...
jschwuch Posted April 12, 2017 Share Posted April 12, 2017 Hi, this is a javascript error not an error specific to babylon. Your _camera property is undefined thus its orthoTop property can't be set (as undefined is not an object). Without a bigger chunk of your code I don't think we can help you here. My tip is to search for each line of your code where you set the _camera property and see if there is a line that doesn't do what you intended it to. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.