Nikos123 Posted December 27, 2015 Share Posted December 27, 2015 How can I achieve an ease like so http://easings.net/fr#easeInOutSine This is the most natural ease for acceleration/deacceleration Quote Link to comment Share on other sites More sharing options...
Nikos123 Posted December 27, 2015 Author Share Posted December 27, 2015 My best approximation: var bezierEase = new BABYLON.BezierCurveEase(0.445, 0.05, 0.55, 0.95); Is this correct? Quote Link to comment Share on other sites More sharing options...
Nikos123 Posted December 27, 2015 Author Share Posted December 27, 2015 Actually this isn't what I want now, what I need is a ease to top speed then an ease down to 0 speed. Investigating. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 28, 2015 Share Posted December 28, 2015 Hi Again! Nikos... I have a funny feeling that you don't want ease-in or ease-out at all. I think you want linear acceleration and deceleration. http://playground.babylonjs.com/#1HZKPM hold A or D keys... check out how that acts. Is that anything like the "feel" you are looking for? Down in the renderLoop, I am constantly rotating 'rotSpeed' amount. RotSpeed starts at 0, but the longer you hold the A or D keys... the faster or slower it goes (because rotSpeed is increasing/decreasing its rotational increments). Up at the top of the playground... there you can see the A/D keys... adding or subtracting .001 rotSpeed per keypress. This gives you a linear easing to full speed, and a linear easing to stop. The thing to remember is that the code in registerBeforeRender is running constantly. How's it feel to you? Is this close to what you are looking-for... as far as easing? *shrug* srimshady 1 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.