mandim Posted October 11, 2018 Share Posted October 11, 2018 Hello, I'm trying to create an SPS with up/down movement of the particles. What I want is to simulate the floating motion in the water. I have tried with pivot.y and Math.sin(k) with k++ but all the particles are moving as a mesh. What I want is to animate the particles randomly (i.e. some of them to move up while some others to move down and at different positions). This is what I got so far: http://playground.babylonjs.com/indexStable.html#EFRPL2 Any suggestions? Quote Link to comment Share on other sites More sharing options...
jerome Posted October 11, 2018 Share Posted October 11, 2018 http://playground.babylonjs.com/indexStable.html#EFRPL2#3 mandim and ssaket 2 Quote Link to comment Share on other sites More sharing options...
JohnK Posted October 11, 2018 Share Posted October 11, 2018 Jerome beat me to it. This one uses the box's horizontal position to determine the height fluctuation http://playground.babylonjs.com/indexStable.html#EFRPL2#5 jerome, mandim and ssaket 3 Quote Link to comment Share on other sites More sharing options...
mandim Posted October 12, 2018 Author Share Posted October 12, 2018 Wwwooowww... Both solutions are elegant. Many thanks!! 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.