webGLmmk Posted December 24, 2015 Share Posted December 24, 2015 I am building a racquetball court. (for a first person racquetball game.) I am having trouble customizing the width and height options for CreatePlane. I found this thread. It looks like i'm doing it right, but its not working. This is the playground, started from "Drag and Drop". http://playground.babylonjs.com/#WHK49#6 The left wall is the one in question. So the wall would show, i commented out the line with {width: 400, height:200} and just put in "200". line 32. Quote //not working: var leftWall = BABYLON.Mesh.CreatePlane("leftWall", {width:400,height:200}, scene); var leftWall = BABYLON.Mesh.CreatePlane("leftWall", 200, scene); (perhaps i've been looking at this too long...) Thanks again! Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted December 24, 2015 Share Posted December 24, 2015 var leftWall = BABYLON.Mesh.CreatePlane("leftWall", 200, scene); leftWall.scaling.x= 2.0; Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 24, 2015 Share Posted December 24, 2015 Hello again gson78, and hi to all others, too. NasimiAsl gave a good answer, but you might desire avoiding scaling. Gson, take a look at http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter AFTER the date of the forum message you saw, some things changed. When using a parameters object { ... } to construct mesh, we now use MeshBuilder instead of Mesh. So, try...var leftWall = BABYLON.MeshBuilder.CreatePlane("leftWall", {width:400,height:200}, scene);That should work, too. Sorry for the confusion... that's an outdated forum post. Party on! NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
webGLmmk Posted December 24, 2015 Author Share Posted December 24, 2015 @wingnut perfect. Funny how the helpfulness of search results depends on whether you know what terms to search for. That page could have been one of the links in the documention i didn't click on. now that I have that working, I finish the scene, and then its on to physics! @nasimiASl thanks, sure i will probably use the scaling thing at some point. Wingnut 1 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.