Jump to content

scaling or resizing custom importedMesh


johnpribesh
 Share

Recommended Posts

I am wondering if there is a way to scale or resize an importMesh. I need to enlarge the mesh from its original import size.  I am currently doing the following, but it has no effect on the size of the mesh:


 BABYLON.SceneLoader.ImportMesh("", "meshes/", selectedMesh, scene, function(addedMeshes) {
    // tried this
    addedMeshes[0].scaling.x = 67;
    // Also tried this
    addedMeshes[0].scaling = new BABYLON.Vector3(67, 67, 67);
        });

Is there a way I can just resize/scale the imported mesh? 

Link to comment
Share on other sites

I bet that's a "piece" of the avatar up in the air, there.  I bet it's a control gizmo (that guy's left nut)... with an over-scaled bounding box around it.

I bet addedMeshes[0] is a "nad".  :D   If you put it into a vise, the avatar automatically does what you ask of it.  :o

errr... maybe not. :)

Link to comment
Share on other sites

Yep, you're on your way.  Cool.  Welcome to the forum, by the way.  You'll learn that MANY things in BJS... can be figured out faster than asking on the forum.  I used to ask a lot of things, too.  I got over it.  :)  Now I just talk aimlessly.  heh

I did my first mesh import to the playground... recently.  http://www.babylonjs-playground.com/#1CMD3G#7

See that line if (text) ?  Essentially, that means... if the model is finally done loading.  That can be a place of rough water for new importing folk.  Scopes and delays.... part of the fun.

Link to comment
Share on other sites

:)  Cool.  The playground searcher... rocks.   http://doc.babylonjs.com/playground

don't try searching for something.something  ...the period screws it up.  But... fun things like  godrays and particles and spherical harmonics... will get you a pile of fun urls to tour.  Notice the ZIP choice at the top.  Take ANY playground demo home and unzip it somewhere... its ready to run... and hack.  But.... just use the playground itself, make a change, hit run, make a change, hit run... it's totally addictive and uber-fun.  The whole atmosphere of the forum, framework, users... its great.  You can't help but have a blast around here.

What part of the planet you on, John?  (if you don't mind me asking)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...