Kartik Gevariya Posted February 11, 2016 Share Posted February 11, 2016 I want to scale Meshes on WorldAxis. So how can I do that? Quote Link to comment Share on other sites More sharing options...
jerome Posted February 11, 2016 Share Posted February 11, 2016 Not sure to understand what you want to achieve ... Could you explain a bit more please ? Quote Link to comment Share on other sites More sharing options...
Kartik Gevariya Posted February 11, 2016 Author Share Posted February 11, 2016 Like I m having one box in 3D whose local axis are different from world axis and I want to scale that box on any world axis then how to scale it? Quote Link to comment Share on other sites More sharing options...
adam Posted February 11, 2016 Share Posted February 11, 2016 The only way I could do it is by using a second mesh as a container. http://www.babylonjs-playground.com/#1O1G4Z#1 Temechon and GameMonetize 2 Quote Link to comment Share on other sites More sharing options...
RaananW Posted February 11, 2016 Share Posted February 11, 2016 So technically you are looking for a scale function that will take a vector and Space (local/world) as variable? Quote Link to comment Share on other sites More sharing options...
jerome Posted February 11, 2016 Share Posted February 11, 2016 Normally, a mesh is firstly scaled, then rotated, then translated (world transformation). I guess you would like something like rotation first, then scaling (always in the local space), then translation. This means the mesh shape could be deformed as Adam suggested. Unless reimplementing the computation order of the World Matrix, I suppose that the simpler way is to set the mesh as updatable, then get its vertices and scale them along the rotated axis. Quote Link to comment Share on other sites More sharing options...
Temechon Posted February 11, 2016 Share Posted February 11, 2016 I vote for Adam's answer : simple and effective. 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.