BangTao Posted January 14, 2017 Share Posted January 14, 2017 or is there any method can directly get the mesh's surface vector attr Quote Link to comment Share on other sites More sharing options...
jerome Posted January 14, 2017 Share Posted January 14, 2017 http://doc.babylonjs.com/classes/2.5/Mesh#getverticesdata-kind-copywhenshared-rarr-number- Quote Link to comment Share on other sites More sharing options...
JohnK Posted January 14, 2017 Share Posted January 14, 2017 These tell you about mesh construction http://babylonjsguide.github.io/advanced/Normals http://babylonjsguide.github.io/advanced/Updating_Vertices http://babylonjsguide.github.io/advanced/Custom jerome 1 Quote Link to comment Share on other sites More sharing options...
BangTao Posted January 16, 2017 Author Share Posted January 16, 2017 @JohnK @jerome thank you! and now ,i wanna create a custom mesh,and i'm trying to add animation to my custom mesh which is derived from 3DMax,every thing is fine until scene.beginAnimation(customMesh, 0, 97, false); I don't know why is this /// and if possible,how can i directly control this mesh's animation use method(↓)every per second? // 3 parameters to create an event: // - The frame at which the event will be triggered // - The action to execute // - A boolean if the event should execute only once (false by default) var event1 = new BABYLON.AnimationEvent(50, function() { console.log("Yeah!"); }, true); // Attach your event to your animation animation.addEvent(event1); Thx Quote Link to comment Share on other sites More sharing options...
JohnK Posted January 16, 2017 Share Posted January 16, 2017 Let's try to simplify your problem. This link http://babylonjsguide.github.io/basics/Starter will give you information on a very simple animation http://www.babylonjs-playground.com/#9WUJN#11 This we can then modify so that after 1 second and event is fired on frame 1 * frameRate as in this playground http://www.babylonjs-playground.com/#9WUJN#17 Your next step is in the playground to just change the animation into one you want step by step checking it works at each stage. This way by building on a simple animation we will be able to help with any errors that show up. NOTE a rotationQuaternion is NOT an array it is a BabylonJS Quaternion object so keys will be like keys.push({ frame: 0, value: new BABYLON.Quaternion.RotationAxis(-0.1098, -0.6771, 0.0.0096, -0.7276) }); It will be very much easier to help you step by step than with a large amount of code. Quote Link to comment Share on other sites More sharing options...
BangTao Posted January 17, 2017 Author Share Posted January 17, 2017 @JohnK Thx,but there still a problem which is :::.and i don't know how to deal with it. Quote Link to comment Share on other sites More sharing options...
JohnK Posted January 17, 2017 Share Posted January 17, 2017 20 hours ago, JohnK said: Your next step is in the playground to just change the animation into one you want step by step checking it works at each stage. This way by building on a simple animation we will be able to help with any errors that show up. Unless you build on the Playground I gave you above and reproduce the errors in the Playground I will no be able to help you further. Others might. Quote Link to comment Share on other sites More sharing options...
BangTao Posted January 17, 2017 Author Share Posted January 17, 2017 @JohnKi find a other way to achieve my goal..this question i'll put it aside now...could you please look at my new-post just now////Thank u. 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.