Zino54220 Posted May 13, 2018 Share Posted May 13, 2018 Hi everyone, I always have a problem with a simple rotation animation. In blender no problem, my object has the correct animation : After : But in BabylonJs : After : It seems like the center of the object has been set with the center of the scene and I don't understand why... I tried many things like : - update version of BabylonJs and Exporter Blender - use CTRl + A -> location and CTRL + A Rotation and Scale, - use "Bake action" menu after creating animation - use parenting Unfortunatly, the problem is not fixed ... For the moment, I can use location animation to progress in my project but I think that I must use a rotation animation early or later in this project. What I'm doing wrong please ??? Quote Link to comment Share on other sites More sharing options...
MadeByJawns Posted May 13, 2018 Share Posted May 13, 2018 Hey! I think a good way to start to diagnose the problem, is to test that the pivot point of your mesh is actually the same as shown in Blender. I am still learning so it may not be the best approach but one way to do this is... 1. Create an object to visually show the pivot point const pivotPoint = BABYLON.MeshBuilder.CreateBox("pivotPoint", {height: 3}, scene); 2. Set the mesh we just created to be positioned at your meshes pivot point pivotPoint.position = mesh.getPivotPoint(); This will allow you to confirm whether the pivot point is indeed at the center of the screen and if so, can move onto the next test of your scene Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted May 14, 2018 Share Posted May 14, 2018 Fairly sure this similar to this topic. Easiest way is to just delete the position property keys from the .babylon file. Fixing this would require a large rework that directly read the animation keys in Blender to determine which properties (position, rotation, or scale) were involved. I know from an experimental Blender-Kinect addin how to do this, but not much incentive. First, as the exporter blocks up multiple Blender actions into the single animation capability of the .babylon format, there could be one action with rotation keys & another with location keys. I also do not use Blender animations. There is something called Animation. ANIMATIONLOOPMODE_RELATIVE. I do not know how to call it, but if the behavior is to take keys and & add the value to existing, it would be another way to go. Quote Link to comment Share on other sites More sharing options...
Zino54220 Posted May 15, 2018 Author Share Posted May 15, 2018 Thanks very much for your replies. I don't know what is the better way to fixe this problem, I must create the animation directlly in BabylonJS or I must change manually the pivot point of the mesh before play animation ? 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.