The Leftover Posted June 6, 2018 Share Posted June 6, 2018 When I create a hexagonal prism for SPS, it does not seem to recognize the rotation. I have been rotating the particles en masse after creation, but I gotta believe I am just doing it wrong. https://www.babylonjs-playground.com/#YI6D05#2 The "shapes" have no color. The particles are colored. To save memory, I must have "updatable" set to false. This makes my work-around harder. Advice requested. Quote Link to comment Share on other sites More sharing options...
alexoy Posted June 6, 2018 Share Posted June 6, 2018 Hi, Could you tell more what is wrong here - https://www.babylonjs-playground.com/#YI6D05#3 ? Which prism should be rotated, but is not? The Leftover 1 Quote Link to comment Share on other sites More sharing options...
jerome Posted June 6, 2018 Share Posted June 6, 2018 The solid particles are built from their model in its local space. It is to say that whatever the transformations applied to the model (translation, rotation, scaling, pivot), they aren't used by the solid particles. You can either : - rotate then the particles according to your needs (at construction time with the position function or at any time with an updatable SPS) - rotate the model, bake it, then build the particles from the rotated baked model : http://doc.babylonjs.com/resources/baking_transformations - both ? The Leftover 1 Quote Link to comment Share on other sites More sharing options...
The Leftover Posted June 6, 2018 Author Share Posted June 6, 2018 Thank you both. Please standby. Quote Link to comment Share on other sites More sharing options...
The Leftover Posted June 6, 2018 Author Share Posted June 6, 2018 Thank you. "Baking" was the best approach for me. Glad I asked. 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.