Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Multiple Particle Attachment ?
#2
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

Quote:Particles affected by more than one attachment will follow the attachment that was updated last. The update order for attachment is undefined.

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;
    }
Reply


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