Posts: 18
Threads: 7
Joined: Aug 2017
Reputation:
2
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
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.
Posts: 6,216
Threads: 23
Joined: Jun 2017
Reputation:
392
Obi Owner:
26-04-2018, 06:53 PM
(This post was last modified: 26-04-2018, 06:54 PM by josemendez.)
(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]](https://preview.ibb.co/jwKLJc/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?
Posts: 18
Threads: 7
Joined: Aug 2017
Reputation:
2
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?
Posts: 6,216
Threads: 23
Joined: Jun 2017
Reputation:
392
Obi Owner:
(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
Posts: 18
Threads: 7
Joined: Aug 2017
Reputation:
2
(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?
Posts: 18
Threads: 7
Joined: Aug 2017
Reputation:
2
(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
Posts: 6,216
Threads: 23
Joined: Jun 2017
Reputation:
392
Obi Owner:
05-05-2018, 12:35 PM
(This post was last modified: 05-05-2018, 12:36 PM by josemendez.)
(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.
|