Posts: 49
Threads: 13
Joined: Oct 2017
Reputation:
1
I'm trying to pin object to a rope. I fixed one end of the rope (without any problems), but when I add pin constraint to another end and start the scene link disappears. Same when I try to add handle to second end and set object as handle's parent. Rope just ignore handles. Restarting Unity didn't help
Unity 2018.3.3f1, ObiRope 4.0.1
Posts: 6,323
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(11-02-2019, 09:10 AM)Evgenius Wrote: I'm trying to pin object to a rope. I fixed one end of the rope (without any problems), but when I add pin constraint to another end and start the scene link disappears. Same when I try to add handle to second end and set object as handle's parent. Rope just ignore handles. Restarting Unity didn't help
Unity 2018.3.3f1, ObiRope 4.0.1
Cannot reproduce here, both handles and pin constraints work in any particle. Handles simply set the particle's mass to infinite, so unless there's something else setting the inverse mass of the rope it should work fine.
If you upgraded scene from 3.x, did you re-create the rope?
Posts: 49
Threads: 13
Joined: Oct 2017
Reputation:
1
(11-02-2019, 09:13 AM)josemendez Wrote: Cannot reproduce here, both handles and pin constraints work in any particle. Handles simply set the particle's mass to infinite, so unless there's something else setting the inverse mass of the rope it should work fine.
If you upgraded scene from 3.x, did you re-create the rope?
It's a new project with freshly imported new Obi plugins. I have two ropes attached to the object. But with identical actions to pin them, sometimes one rope attached, sometimes none. I'm pretty experienced with ObiRope, I done that hundred times. But this time I somewhy have these problems. Actions:
1. Initialize rope.
2. Fix one end.
3. Create obi handle for the second end.
OR
3. Add pin constraint to second end.
4. Link Object's ObiCollider to pin constraint.
(After playing scene pin constraint lose link and becomes None)
Posts: 6,323
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
11-02-2019, 09:27 AM
(This post was last modified: 11-02-2019, 09:27 AM by josemendez.)
(11-02-2019, 09:19 AM)Evgenius Wrote: It's a new project with freshly imported new Obi plugins. I have two ropes attached to the object. But with identical actions to pin them, sometimes one rope attached, sometimes none. I'm pretty experienced with ObiRope, I done that hundred times. But this time I somewhy have these problems. Actions:
1. Initialize rope.
2. Fix one end.
3. Create obi handle for the second end.
OR
3. Add pin constraint to second end.
4. Link Object's ObiCollider to pin constraint.
(After playing scene pin constraint lose link and becomes None)
I'm testing this in the same Unity version (2018.3.3f1), with rope 4.0.1 and cannot reproduce this behavior.
If the reference to the pinned object becomes none, then it's clear something else is resetting it. Or in case the rope is part of a prefab, it is being resetted to its prefab state. Could you share more details about your setup?
Posts: 49
Threads: 13
Joined: Oct 2017
Reputation:
1
(11-02-2019, 09:27 AM)josemendez Wrote: I'm testing this in the same Unity version (2018.3.3f1), with rope 4.0.1 and cannot reproduce this behavior.
If the reference to the pinned object becomes none, then it's clear something else is resetting it. Or in case the rope is part of a prefab, it is being resetted to its prefab state. Could you share more details about your setup?
It might be because of prefab. I created a new rope without prefab and it worked. But I need to set constraints in prefabed rope. Object that it should be attached is also inside this prefab, so there is no any links outside of it. But it reset it anyway, and I can't get why. I've tried to unpack prefab and work with rope like with fresh new, but the problem still appears. There are no any other scripts in scene.
Posts: 6,323
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(11-02-2019, 09:39 AM)Evgenius Wrote: It might be because of prefab. I created a new rope without prefab and it worked. But I need to set constraints in prefabed rope. Object that it should be attached is also inside this prefab, so there is no any links outside of it. But it reset it anyway, and I can't get why. I've tried to unpack prefab and work with rope like with fresh new, but the problem still appears. There are no any other scripts in scene.
Works fine for me when using prefabs, too. Make sure that you apply the prefab after adding constraints, as they're stored in the rope (it's simply a serialized list of <integer, object reference> pairs)
Posts: 49
Threads: 13
Joined: Oct 2017
Reputation:
1
(11-02-2019, 09:56 AM)josemendez Wrote: Works fine for me when using prefabs, too. Make sure that you apply the prefab after adding constraints, as they're stored in the rope (it's simply a serialized list of <integer, object reference> pairs)
I've tried to recreate prefab with pin constraints. It's working but in first frame it sets my object to 0,0,0 position. If I set object to kinematic, ropes go to 0,0,0 in first frame, and then spring back to object.
Posts: 6,323
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
11-02-2019, 10:28 AM
(This post was last modified: 11-02-2019, 10:29 AM by josemendez.)
(11-02-2019, 10:14 AM)Evgenius Wrote: I've tried to recreate prefab with pin constraints. It's working but in first frame it sets my object to 0,0,0 position. If I set object to kinematic, ropes go to 0,0,0 in first frame, and then spring back to object.
Hi,
Here's a video of how I set it up:
https://we.tl/t-GBJ4juPHCS
I have no problem getting prefabs and pin constraints to work together, the rope and the object appear at the correct position when instantiating them. I cannot think of any reason that would position the object at 0,0,0 depending on whether it is kinematic or not, this is not related to object positioning in any way, nor Obi does any distinction between kinematic and non-kinematic objects.
Posts: 49
Threads: 13
Joined: Oct 2017
Reputation:
1
(11-02-2019, 10:28 AM)josemendez Wrote: Hi,
Here's a video of how I set it up:
https://we.tl/t-GBJ4juPHCS
I have no problem getting prefabs and pin constraints to work together, the rope and the object appear at the correct position when instantiating them. I cannot think of any reason that would position the object at 0,0,0 depending on whether it is kinematic or not, this is not related to object positioning in any way, nor Obi does any distinction between kinematic and non-kinematic objects.
Could I send a video to support(at)virtualmethodstudio.com and continue to discuss it there?
Posts: 6,323
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(11-02-2019, 10:49 AM)Evgenius Wrote: Could I send a video to support(at)virtualmethodstudio.com and continue to discuss it there?
Yes, of course
|