Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pin constraint offset
#1
Using Obi Rope 3.3, I setup pin contraints on a couple of particles and attached them all to a ObiCollider. The thing is, I select the particle and a add the pin constraint. It looks correct when its done. It works the way as stated in the tutorial.
Quote:By default, the offset property of the pin constraint is automatically calculated to keep the relative position of particle and rigidbody at the moment of pinning.

But as I play in the editor, the offsets changes, like the picture below

[Image: obirope.png]

Any clue what is going on? There is a script associated with the rope that deals with restoring the rope state when some key is pressed only.
Reply
#2
(26-04-2018, 05:42 PM)leonrdo Wrote: Using Obi Rope 3.3, I setup pin contraints on a couple of particles and attached them all to a ObiCollider. The thing is, I select the particle and a add the pin constraint. It looks correct when its done. It works the way as stated in the tutorial.

But as I play in the editor, the offsets changes, like the picture below

[Image: obirope.png]

Any clue what is going on? There is a script associated with the rope that deals with restoring the rope state when some key is pressed only.

Judging from the image, I cannot tell if the pin offset (cyan dot) has moved or (much more probable) the particle is lagging behind due to insufficient pin constraint iterations, or wrong constraint order (in 3.3).

Have you tried stepping frame by frame, to see if the offset actually moves?
Reply
#3
Looking step by step, the pin is static but the particle moves aways from it (not what I expecting to happen).
The constraint order has something to do with it? I mean, I was using a previous version that I could change the order of the constraint before update the Obi system

(26-04-2018, 06:53 PM)josemendez Wrote: Judging from the image, I cannot tell if the pin offset (cyan dot) has moved or (much more probable) the particle is lagging behind due to insufficient pin constraint iterations, or wrong constraint order (in 3.3).

Have you tried stepping frame by frame, to see if the offset actually moves?
Reply
#4
(26-04-2018, 07:29 PM)leonrdo Wrote: Looking step by step, the pin is static but the particle moves aways from it (not what I expecting to happen).
The constraint order has something to do with it? I mean, I was using a previous version that I could change the order of the constraint before update the Obi system

If you are using 3.3, set Pin Constraints to update last. This will prevent distance constraints from "undoing" the work done by pin constraints. See the last bit of:
http://obi.virtualmethodstudio.com/tutor...olver.html
Reply
#5
(26-04-2018, 09:30 PM)josemendez Wrote: If you are using 3.3, set Pin Constraints to update last. This will prevent distance constraints from "undoing" the work done by pin constraints. See the last bit of:
http://obi.virtualmethodstudio.com/tutor...olver.html

But the version 3.3 is the one that updated the UI and no longer I can reorder the constraints in the ObiSolver. Are you talking about doing this via script, if there is a way?
Reply
#6
(27-04-2018, 01:13 PM)leonrdo Wrote: But the version 3.3 is the one that updated the UI and no longer I can reorder the constraints in the ObiSolver. Are you talking about doing this via script, if there is a way?

UP
Reply
#7
(03-05-2018, 07:30 PM)leonrdo Wrote: UP

Hi there,

If you're already using 3.3 (which is the first version that removed constraint ordering, my mistake to say it was 3.2) then the order is correct by default (pin constraints are update last), there's nothing to do in regards to ordering.

Make sure that the simulation is happening every frame after you move the object. For instance, if your object is animated you should set the solver update mode to AfterFixedUpdate, or if you are manually changing the object's transform, use LateUpdate.
Reply