PixelPush Posted September 25, 2017 Share Posted September 25, 2017 Hi All, How should I go about obtaining the size of mesh in pixels? Is this even possible ? I assume there is away to obtain measurements for the bounding box or something..? Cheers Quote Link to comment Share on other sites More sharing options...
PixelPush Posted September 25, 2017 Author Share Posted September 25, 2017 So I've managed to get some data by using the following code sphere.getBoundingInfo().boundingBox.maximumWorld This is on a Babylon sphere. The maximumWorld property is returning the x,y,z values but not sure what the units are at this point. Hopefully this will help any other noobs with the same issue. If anyone knows a better method please post it here Quote Link to comment Share on other sites More sharing options...
jerome Posted September 25, 2017 Share Posted September 25, 2017 1 hour ago, PixelPush said: How should I go about obtaining the size of mesh in pixels What do you call the size of a mesh in pixels ? A mesh is a geometry : a pool of vertices and edges. These vertices have 3D coordinates in the mesh local space. Maybe are you talking about the projection of the mesh in the screen space ? This one is depending on the position of the mesh in the World space, on the position of the camera in the World and, of course, on the canvas/windows (viewport) size. 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.