Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Multiple Particle Attachment ?
#3
(08-10-2020, 08:00 AM)josemendez Wrote: Hi Vincent,

Attaching the same particle group to multiple transforms doesn't make any sense. Just like it doesn't make sense to have a transform with multiple parents (in fact, this isn't possible in any transform hierarchy implementation that I know of). What's your use case for this?

The manual specifies that in case of multiple attachments for the same particle, the result is undefined:
http://obi.virtualmethodstudio.com/tutor...ments.html


Particle groups are stored in a plain generic List<>. So you can access by index just like you would any other list:
Code:
var particleGroup = rope.blueprint.groups[index];

If you want to access them by name, you have to perform a linear search:
Code:
public ObiParticleGroup GetGroupByName(string name)
    {
        foreach (var group in rope.blueprint.groups)
            if (group.name == name)
                return group;
        return null;
    }

Thanks a lot for the response Jose !

For my use case, I guess I was not clear enough, my bad. I made a video to make it more obvious. https://www.youtube.com/watch?v=cNQflI6b5IQ

I have a rope, at the end of which is a "hook" (symbolised here by the sphere that the character picks up) . Now that hook is already a dynamic particle attachment for the rope. But then I would like to attach a crate at the end oh the rope, in such a way that I can then drag that box around.
What you see in the video is a solution I'm trying : moving the "hook" above th crate, and adding a hinge joint to the crate. But has you can see it's pretty violent and unstable... My question, I guess, was just what the best way to achieve this in an efficient way is.

Hope it is clearer and thanks again Sonrisa
Reply


Messages In This Thread
Multiple Particle Attachment ? - by VincentAbert - 07-10-2020, 09:16 PM
RE: Multiple Particle Attachment ? - by VincentAbert - 08-10-2020, 09:34 AM