Posts: 7
Threads: 1
Joined: Apr 2021
Reputation:
0
16-04-2021, 08:28 AM
(This post was last modified: 16-04-2021, 08:30 AM by dhon2407.)
Hi, I tried to create a simple rope with hanging object. I works as expect on the test scene, but on my game scene its acting weirdly.
Obi Solver, Obi Rope, OniCollisionWorld are on prefab. On my test scene the prefab is already on the scene hierarchy, but on my main game scene the prefab is instantiated on runtime.
Screencaptures : https://drive.google.com/drive/folders/1...sp=sharing
Posts: 6,347
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(16-04-2021, 08:28 AM)dhon2407 Wrote: Hi, I tried to create a simple rope with hanging object. I works as expect on the test scene, but on my game scene its acting weirdly.
Obi Solver, Obi Rope, OniCollisionWorld are on prefab. On my test scene the prefab is already on the scene hierarchy, but on my main game scene the prefab is instantiated on runtime.
Screencaptures : https://drive.google.com/drive/folders/1...sp=sharing
It's difficult to tell just from the video, but it looks like the rope is attached inside (or overlapping) a collider. This will cause a force-feedback loop, because the rope can't be simultaneously inside (that's what the attachment wants) and outside (that's what the collider wants).
The solution is to disable collision between the collider and the rope, using phases or deactivating the collider. See the last part of:
http://obi.virtualmethodstudio.com/tutor...aints.html
Posts: 7
Threads: 1
Joined: Apr 2021
Reputation:
0
16-04-2021, 10:04 AM
(This post was last modified: 16-04-2021, 10:05 AM by dhon2407.)
(16-04-2021, 08:34 AM)josemendez Wrote: It's difficult to tell just from the video, but it looks like the rope is attached inside (or overlapping) a collider. This will cause a force-feedback loop, because the rope can't be simultaneously inside (that's what the attachment wants) and outside (that's what the collider wants).
The solution is to disable collision between the collider and the rope, using phases or deactivating the collider. See the last part of:
http://obi.virtualmethodstudio.com/tutor...aints.html
I really appreciate your quick reply. But, I didn't quite understand how to disable the collision from the collider to the rope "By setting the particle phase value to the same as the collider's, no contacts will be generated between them and collisions will not interfere with the pin constraint.". Base on added(same google drive link) screenshot, collider is not touching the rope.
Posts: 6,347
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
You can set phases on a per-control point basis in the path editor (just like you can with mass, color, thickness etc). See: http://obi.virtualmethodstudio.com/tutor...setup.html
Quote:Phase
Particle phase, used to determine when collisions with rigidbodies and other particles should be ignored. For an in-depth explanation, see collisions.
I think the rope is also thinner in the video where it behaves weirdly. Could it be that the solver is parented to a transformed (rotated, scaled) object? Keep in mind that solvers perform simulation in local space, so if you rotate, translate or scale them , you also transform the simulation.
Posts: 7
Threads: 1
Joined: Apr 2021
Reputation:
0
(16-04-2021, 10:11 AM)josemendez Wrote: You can set phases on a per-control point basis in the path editor (just like you can with mass, color, thickness etc). See: http://obi.virtualmethodstudio.com/tutor...setup.html
I think the rope is also thinner in the video where it behaves weirdly. Could it be that the solver is parented to a transformed (rotated, scaled) object? Keep in mind that solvers perform simulation in local space, so if you rotate, translate or scale them , you also transform the simulation.
Yes, your assumption on solver's position on hierarchy is correct, it located is deep inside the prefab's grandchildren's children with many variations of scale changes and rotation, that's why also the rope is thinner on the main scene compare to the test scene. I think that is my main concern for now. Thanks your quick reply.
Posts: 7
Threads: 1
Joined: Apr 2021
Reputation:
0
(16-04-2021, 10:34 AM)dhon2407 Wrote: Yes, your assumption on solver's position on hierarchy is correct, it located is deep inside the prefab's grandchildren's children with many variations of scale changes and rotation, that's why also the rope is thinner on the main scene compare to the test scene. I think that is my main concern for now. Thanks your quick reply.
I have manage to make it work somehow. But I have a new problem, when I suddenly and constantly moving my object, the rope detaches on the dynamic type particle attachment.
https://drive.google.com/file/d/17ESvACD...sp=sharing
Posts: 6,347
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(20-04-2021, 10:35 AM)dhon2407 Wrote: I have manage to make it work somehow. But I have a new problem, when I suddenly and constantly moving my object, the rope detaches on the dynamic type particle attachment.
https://drive.google.com/file/d/17ESvACD...sp=sharing
This can have a lot of different causes, but I don't have enough info to tell for sure:
- Simulation happening before input each frame, resulting in a 1-frame delay.
- Different interpolation settings for the rigidbody and the rope, resulting in several frames delay.
- Not enough pin constraint iterations.
If you could give more details regarding your setup I could help.
Posts: 7
Threads: 1
Joined: Apr 2021
Reputation:
0
20-04-2021, 11:51 AM
(This post was last modified: 20-04-2021, 11:52 AM by dhon2407.)
(20-04-2021, 11:32 AM)josemendez Wrote: This can have a lot of different causes, but I don't have enough info to tell for sure:
- Simulation happening before input each frame, resulting in a 1-frame delay.
- Different interpolation settings for the rigidbody and the rope, resulting in several frames delay.
- Not enough pin constraint iterations.
If you could give more details regarding your setup I could help.
Sure here are some of the gameobject details, let me know if you need more details on some objects.
(20-04-2021, 11:51 AM)dhon2407 Wrote: Sure here are some of the gameobject details, let me know if you need more details on some objects.
I can't see my attachments, you can check the link too.
https://drive.google.com/drive/folders/1...sp=sharing
Posts: 7
Threads: 1
Joined: Apr 2021
Reputation:
0
21-04-2021, 08:24 AM
(This post was last modified: 21-04-2021, 08:31 AM by josemendez.)
(20-04-2021, 11:32 AM)josemendez Wrote: This can have a lot of different causes, but I don't have enough info to tell for sure:
- Simulation happening before input each frame, resulting in a 1-frame delay.
- Different interpolation settings for the rigidbody and the rope, resulting in several frames delay.
- Not enough pin constraint iterations.
If you could give more details regarding your setup I could help.
Hey jose, did you check you my configuration? If you say not enough pin constrait iterations? What do you mean? How I can adjust the constraint iterations? You mean from the obi solver? I tried 10 and 100 still no improvements.
Posts: 6,347
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
21-04-2021, 08:31 AM
(This post was last modified: 21-04-2021, 08:32 AM by josemendez.)
(21-04-2021, 08:24 AM)dhon2407 Wrote: Hey jose, did you check you my configuration? If you say not enough pin constrait iterations? What do you mean? How I can adjust the constraint iterations? You mean from the obi solver? I tried 10 and 100 still no improvements.
Hi there!
If adjusting the amount of pin constraint iterations (in the ObiSolver, see: http://obi.virtualmethodstudio.com/tutor...olver.html) does not solve this, the issue is clearly elsewhere.
I can't see anything wrong with the setup images you shared. If you want I can take a look at the project myself, if you send it to support(at)virtualmethodstudio.com.
|