MichaelD Posted January 24, 2018 Share Posted January 24, 2018 Hello, Is there a way to get the size of an object after the window has been resized? (Whole scene gets scaled down/up). planet2.getBoundingInfo().boundingBox.vectorsWorld; but it only displays 1.25 no matter how much I resize my browser window Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 24, 2018 Share Posted January 24, 2018 Hello, this is correct as the size is expressed in world unit and not screen space But you can take every vectors of your bounding box and use BABYLON.Vector3.Project to get the screen projected coordinates: var vect = BABYLON.Vector3.Project(position, BABYLON.Matrix.Identity(), scene.getTransformMatrix(), camera.viewport.toGlobal(engine)); Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 24, 2018 Share Posted January 24, 2018 Delta beat me to it. I posted an example in your other thread. GameMonetize 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.