![]() |
|
Suggestion / Idea Adjust position offsets in ObiParticleAttachment - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html) +--- Thread: Suggestion / Idea Adjust position offsets in ObiParticleAttachment (/thread-4633.html) |
Adjust position offsets in ObiParticleAttachment - OstapDev - 08-07-2026 Hi! I created a grappling hook with attachments, and when I initialized it in the ObiParticleAttachment code, position offsets were automatically set. Since there were no public methods in the code to change them, I commented out line 228 in ObiParticleAttachment.cs, where these offsets were set. Please add a checkbox to disable the offsets, or the ability to adjust them. Obi Physics Suite v7.1.1 RE: Adjust position offsets in ObiParticleAttachment - josemendez - 08-07-2026 Hi, If you comment that line out, offsets will default to zero which is not what you want in most cases (unless you’re looking to collapse all particles in the group to the target’s pivot/local origin with identity rotation). Instead, simply move the particles in the group (and/or the target transform) to where you want them to be attached before enabling the attachment, as shown in the manual: https://obi.virtualmethodstudio.com/manual/7.1/scriptingattachments.html This is much cleaner than modifying the offsets directly and also a lot more flexible, as it allows you to move the particles, the target, or both, using only translation or also considering rotation/scale if needed. Once you’ve placed things where you want them to be and enable the attachment, particle positions and orientations relative to the target’s current transform will be cached as offsets for performance. Kind regards |