Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  prevent dynamic attachment from disjointing on re-enable
#2
(06-07-2024, 11:34 AM)rystills Wrote: Each time the root object containing the solver, chain, and body is disabled and subsequently reenabled, the body becomes further disjointed by the same amount:

This is the intended behavior, as explained the manual:
http://obi.virtualmethodstudio.com/manua...ments.html

Quote:It's important to realize that attachments do not move the particle group to the position of the target object, nor the target object to the position of the particle group. Moving the particle group to the target's position would collapse all particles into a single point, and would result in a kickback effect once the particles spring back to their original positions. Moving the target could cause a whole palette of issues depending on your game logic.

Instead, particles in the group are attached at their current position relative to the target object. This makes it simple to work with multiple particles, and ensures smooth attachments with no initial "jumps" or sudden motions.

Anytime an attachment is enabled, it attaches the particle group and the target at their current relative position. It won't move either of them, to prevent either adding unwanted energy to the simulation or moving a transform that might break your game's logic. In case you want the attachment to move either the particle group to a specific point on the target transform - or the target transform to the position of a particle in the group, the solution is to do it yourself before re-enabling the attachment:

Quote:If you want particles attached at a specific position other than their position at the time of creating the attachment, you can set their position at runtime before creating the attachment: see scripting particles.

let me know if you need further help,

kind regards
Reply


Messages In This Thread
RE: prevent dynamic attachment from disjointing on re-enable - by josemendez - 08-07-2024, 12:10 PM