simpleyuji Posted September 14, 2017 Share Posted September 14, 2017 I'm calling BABYLON.Mesh.CreateGround("ground1", CANVAS_SIZE, CANVAS_SIZE, 2, scene) to create a ground, but it starts at (0,0,0) and expands outwards in x,z plane in both positive and negative directions. I was wondering if its possible to make a ground such that it only grows in positive direction. I want to avoid negative values when setting player positions . Quote Link to comment Share on other sites More sharing options...
Arte Posted September 14, 2017 Share Posted September 14, 2017 38 minutes ago, simpleyuji said: I'm calling BABYLON.Mesh.CreateGround("ground1", CANVAS_SIZE, CANVAS_SIZE, 2, scene) to create a ground, but it starts at (0,0,0) and expands outwards in x,z plane in both positive and negative directions. I was wondering if its possible to make a ground such that it only grows in positive direction. I want to avoid negative values when setting player positions . Hi simpleyuji, I guess you need to play with pivot point. Dock: Pivot Point Quote Link to comment Share on other sites More sharing options...
simpleyuji Posted September 14, 2017 Author Share Posted September 14, 2017 Cool. Thanks Arte. Will take a look at it. Quote Link to comment Share on other sites More sharing options...
simpleyuji Posted September 17, 2017 Author Share Posted September 17, 2017 So apparently, setting the ground position is good enough. ground = BABYLON.Mesh.CreateGround("ground1", CANVAS_SIZE, CANVAS_SIZE, 2, scene); ground.position = new BABYLON.Vector3(CANVAS_SIZE/2, 0, CANVAS_SIZE/2); 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.