08-10-2020, 08:00 AM
(This post was last modified: 08-10-2020, 08:24 AM by josemendez.)
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:
If you want to access them by name, you have to perform a linear search:
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;
}