reddozen Posted July 19, 2014 Share Posted July 19, 2014 Animated mesh exported from 3DS Max 2013 using the babylon exporter. Please see the link: Adjusting the scale, rotation, and position doesn't get applied to the actual mesh. Babylon Model Files:Max Scene: BABYLON.SceneLoader.ImportMesh("", "../Models/Monsters/", "Boss_Pukui.babylon", scene, function (mapZone, particleSystems, skeletons) { mapZone[0].rotationQuaternion = null; mapZone[0].scaling = new BABYLON.Vector3(0.0005, 0.0005, 0.0005); mapZone[0].rotation = new BABYLON.Vector3(0, -3.141593, 0.000000); mapZone[0].position = new BABYLON.Vector3(-104.0314, 4.3437, -14.2259); } ); Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted July 19, 2014 Share Posted July 19, 2014 I do not remember why I did this for code generated out of Tower of Babel (this part was very early), but I think it was the same as your problem. Vector3 objects are assigned to scaling, rotation, & position in the Mesh constructor. I just assign into the pre-existing ones: mapZone[0].position.x = -104.0314; mapZone[0].position.y = 4.3437; mapZone[0].position.z = -14.2259; mapZone[0].rotation.x = 0; mapZone[0].rotation.y = -3.141593; mapZone[0].rotation.z = 0; mapZone[0].scaling.x = 0.005; mapZone[0].scaling.y = 0.005; mapZone[0].scaling.z = 0.005;Later, I think I saw that you have to call some method that tells the system, that you changed the objects. This was is what I prefer. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 19, 2014 Share Posted July 19, 2014 An animated object is animated so if mesh.position is animated then you cannot control mesh.position because animations will overwrite your update Other question: are you sure mapZone[0] is the mesh you want to control? Quote Link to comment Share on other sites More sharing options...
reddozen Posted July 19, 2014 Author Share Posted July 19, 2014 then how do you place or move animated objects? Also, shouldn't scale also be independent of position then too? mapZone[0] should be the first and only mesh in the babylon package, so unless i was addressing the actual animation in as the skeleton, then i would assume that mapZone would be what I want. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 21, 2014 Share Posted July 21, 2014 To move an animated object you have to ensure that there is no position animation in your file. Is it the case? Quote Link to comment Share on other sites More sharing options...
reddozen Posted July 21, 2014 Author Share Posted July 21, 2014 There shouldn't be. Any movement through the environment would be independent of the animations. 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.