BlackMojito Posted December 14, 2017 Share Posted December 14, 2017 In the constructor of SpriteManager, we can specify the size of its sprites. Let's say if I set it to 64, I will have 64 pixel x 64 pixel square sprites. But what is its exact size in 3D world space? If the position is (0, 0, 0), how do we calculate its exact 3D scale? Or is the cellSize only used for cropping the Image? I am a little bit confused... Quote Link to comment Share on other sites More sharing options...
SvenFrankson Posted December 14, 2017 Share Posted December 14, 2017 From https://doc.babylonjs.com/babylon101/sprites , I would say the 3D size is set by the property .size (or .width and .height) Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted December 14, 2017 Share Posted December 14, 2017 @SvenFrankson is correct, https://www.babylonjs-playground.com/#2K1K0R Quote Link to comment Share on other sites More sharing options...
BlackMojito Posted December 15, 2017 Author Share Posted December 15, 2017 7 hours ago, aWeirdo said: @SvenFrankson is correct, https://www.babylonjs-playground.com/#2K1K0R OK sure. BTW, why there is no function in BABYLON.Scene which can remove a SpriteManager? Quote Link to comment Share on other sites More sharing options...
brianzinn Posted December 15, 2017 Share Posted December 15, 2017 Just call dispose() - it's just a regular class and remove it from the spriteManagers array property on Scene object. I agree it would be useful to have a method like removeMesh() called removeSpriteManager() - that's the great thing about open source! 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.