2D Softbody skinning problem - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Softbody (https://obi.virtualmethodstudio.com/forum/forum-12.html) +--- Thread: 2D Softbody skinning problem (/thread-2277.html) |
2D Softbody skinning problem - rosedev - 31-05-2020 Hello, I'm trying to use a 3D mesh in 2D simulation mode. When I start the game with ObiSolver in 2D mode, the mesh looks not correct. However, if I hot switch to 3D mode (with the same blueprint and other settings), the mesh looks just fine. But I need it to be in 2D. Is there a way to fix this? Some more info: -I made volume blueprint using 3D mesh as source mesh, but I set Z scale to zero, so the particles grid looks flat, as it should be I think. -Using "4 Bones" in Skin Weights in Unity Quality Settings -Attached the screenshots of character in 2D mode, in 3D mode, blueprint setup, and mesh with ObiParticleRenderer enabled. -I used different settings in ObiSoftbodySkinner, but the result is always screwed. Current settings is: Falloff = 1, Max Distance = 3 Thank you very much in advance. [attachment=709][attachment=710][attachment=711][attachment=708] RE: 2D Softbody skinning problem - rosedev - 01-06-2020 It seems that volume blueprint generated incorrect orientations and restOrientations for my mesh. In ObiSoftbodyVolumeBlueprint Initialize() method (line 98) I changed Code: Quaternion orientation = Quaternion.LookRotation(normals[i]); to Code: Quaternion orientation = Quaternion.Euler(0, 180, 0); RE: 2D Softbody skinning problem - josemendez - 01-06-2020 Hi there! Since you generated your blueprint from a scaled, "flat" version of your mesh, mesh normals (which are used to orient the particles) still point in their original directions, as we do not transform them when generating the blueprint. You would want them to point directly straight out of the 2D plane, which is exactly what your modification achieves. Glad you figured it out! Note: using an actual flat mesh as the source would have worked, btw. |