Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestion / Idea  Adjust position offsets in ObiParticleAttachment
#1
Información 
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
Reply
#2
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/manu...ments.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
Reply