Jump to content

ImportMesh Animations


reddozen
 Share

Recommended Posts

I cannot seem to get this to let me scale the model. No matter what scale I put in, it doesn't change. Also, the animation is playing without me telling it to start as soon as the model is loaded. Any advice?

				BABYLON.SceneLoader.ImportMesh("", "../Models/NPCs/Monsters/Boss Pukui/", "BossPukui.babylon", scene,					function (mapZone, particleSystems, skeletons)					{						mapZone[0].rotationQuaternion = null;						mapZone[0].scaling = new BABYLON.Vector3(0.00001, 0.00001, 0.00001);					//	mapZone[0].rotation = new BABYLON.Vector3(0, -3.141593, 0.000000);						mapZone[0].position = new BABYLON.Vector3(-104.0314, 4.3437, -14.2259);					//	scene.beginAnimation(skeletons[0], 0, 250, true)					}				);
Link to comment
Share on other sites

On the 2nd point, search for "autoAnimate" in your .babylon.  Edit and change to false.  Crude yes, but unless you can edit your exporter, no choice.  This cannot happen to skeletons from Blender.

 

On the first, maybe add mapZone[0].computeWorldMatrix(true);

Forcing, might change behavior and yield clue.

Link to comment
Share on other sites

Another thing that has gotten me, in regards to scaling in Babylon, is when in object mode in Blender, you want your position, rotation and scale to be the default values:

 

Position: 0, 0, 0

Rotation: 0, 0, 0

Scaling: 1, 1, 1

 

And only edit those values when you are in Edit mode of the object. Otherwise the exporter will not behave as expected. If this has nothing to do with it, then I will just walk right along haha

Link to comment
Share on other sites

Another thing that has gotten me, in regards to scaling in Babylon, is when in object mode in Blender, you want your position, rotation and scale to be the default values:

 

Position: 0, 0, 0

Rotation: 0, 0, 0

Scaling: 1, 1, 1

 

And only edit those values when you are in Edit mode of the object. Otherwise the exporter will not behave as expected. If this has nothing to do with it, then I will just walk right along haha

 

Yeah, this is not an issue with the exporter. Just me being half asleep and making silly mistakes. :)

Link to comment
Share on other sites

So my only issue now is the auto start of the animations. I've made them all "false" in the Babylon file, and he still auto starts. Can this auto start setting be made a selectable option in the 3DS exporter? All my animations will be triggered etc through a state machine.

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...