11-05-2023, 10:22 AM
(This post was last modified: 11-05-2023, 10:23 AM by josemendez.)
(04-05-2023, 10:05 AM)5G_Zendmast Wrote: The next part that I'm stuck at is attaching the the cable to an object.
Usually I would:
- Make a rope blueprint
- Add controlpoint
- Add ObiAttachement component
- Attach an object to the Attachment component and assign the correct controlpoint
- Animate the objects transform to then also animate the cable behaviour at that point.
Though, in this case the situation is different as there is no rope blueprint with fixed controlpoints.
Hi!
You can create particle groups at runtime, in addition to the ones automatically created when generating the blueprint (one per control point). The manual shows some sample code to do this:
Code:
var group = ScriptableObject.CreateInstance<ObiParticleGroup>();
group.particleIndices.Add(particleIndex); // index of the particle in the actor
attachment.particleGroup = group;
let me know if you need further help,
kind regards