Art Vandelay

Scaling Uploaded OBJ mesh

Recommended Posts

Hi,

I am loading an obj file and trying to scale it as shown below. The mesh is loaded but the scaling does not work. What am I doing wrong?

          var maraca = loader.addMeshTask("maraca", "", "assets/", "Maraca.obj");
          maraca.scaling = new BABYLON.Vector3(0.1, 0.1, 0.1);

Thanks!

Share this post


Link to post
Share on other sites

What you get from the loader is a mesh task - it is an object with an onSuccess callback, that is executed when the mesh was loaded.

The first variable in this callback is an array of meshes that you received from the Maraca.obj file. Those meshes (probably a single mesh in the array) should be scaled.

Check the asset manager documentation here - http://doc.babylonjs.com/how_to/how_to_use_assetsmanager#meshassettask

Share this post


Link to post
Share on other sites

A few options here: 

1. I had the answer already, I just waited a second before you posted yours and then posted mine.

2. I have full control over the database, and I changed the signature of my post

3. I really AM a retired time traveler!

4. I wrote a very complex AI extension for chrome that tells me the minute there is a question i can actually answer. And if it can, it simply answers on its own. based on IBM Watson, Amazon Alexa, Siri, Cortana, and that horrible thing google has.

 

Choose 1! :) 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.