Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Any tutorial for stitcher?
#2
(16-10-2021, 11:23 AM)Snail921 Wrote: the stitched particles are not lined up smoothly and they seem they are fighting (colliding) each other.

That's because they probably are! Sonrisa

Unless you explicitly disable collisions between these particles, they will collide with each other. Coupled with the stitch constraints, this will lead to constraint fighting: particles are simultaneously trying to be exactly on top of each other (stitch), and away from each other (collision).

This is the same issue described in the manual that happens between colliders and particles when using dynamic attachments (pin constraints):
http://obi.virtualmethodstudio.com/manua...aints.html

Just set the collision filters so that these particles in particular don't collide with each other. For info on collision filtering, see "collision filtering" in the collisions page:
http://obi.virtualmethodstudio.com/manua...sions.html

At runtime, filters are just another per-particle property (like positions, velocities, etc), you can set them the usual way:
http://obi.virtualmethodstudio.com/manua...icles.html

Obi contains a helper function (ObiUtils.MakeFilter) to build filters for you, so that you don't have to deal with bitwise operations too much. Filters are made of a mask and a category. The mask is the first parameter of the function. Just keep in mind the mask is a bit mask (just like Unity's layer masks), so you build it by simply or'ing together bits. For instance, to build a filter set in category 0, that only collides with categories 1, 3, and 6:


Code:
int mask = (1 << 1) | (1 << 3) | (1 << 6);
int category = 0;
int filter = ObiUtils.MakeFilter(mask, category);
Reply


Messages In This Thread
Any tutorial for stitcher? - by Snail921 - 16-10-2021, 11:23 AM
RE: Any tutorial for stitcher? - by josemendez - 18-10-2021, 07:39 AM
RE: Any tutorial for stitcher? - by Snail921 - 21-10-2021, 06:45 AM
RE: Any tutorial for stitcher? - by josemendez - 21-10-2021, 08:33 AM
RE: Any tutorial for stitcher? - by Snail921 - 21-10-2021, 05:16 PM
RE: Any tutorial for stitcher? - by josemendez - 22-10-2021, 07:44 AM
RE: Any tutorial for stitcher? - by Snail921 - 23-10-2021, 08:36 AM
RE: Any tutorial for stitcher? - by josemendez - 25-10-2021, 09:15 AM