Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Rope physics unstable
#3
(23-07-2020, 12:23 PM)josemendez Wrote: Hi,

Most of your stability issues seem to be caused by the attachment: you're attaching the rope inside of a collider, while collisions are enabled. This will create an energy feedback loop in the rope causing all sorts of stability issues, because you're essentially imposing two constraints that can't be met simultaneously: stay pinned inside the collider, but also stay outside of it. This situation is described in the last section of this manual page, along with the solution:
http://obi.virtualmethodstudio.com/tutor...aints.html

Regarding stiffness, using more substeps is guaranteed to improve convergence, thus reducing stretching. With 5-6 substeps you should get practically inextensible rope.


Not tether constraints, but distance constraints. Tethers aren't used in rope so changing their iteration count won't have any effect whatsoever. Check this manual page, it describes in detail how the engine works, and how iterations/substeps affect the simulation quality:
http://obi.virtualmethodstudio.com/tutor...gence.html


If your game behaves differently when using a different timestep, it means you're not taking the timestep into account at all. Things that happen in FixedUpdate()  should be multiplied by Time.fixedDeltaTime, etc.

Hello

The inter collider attachment issue was one i believe i trouble shot and solved before i made this post, so i don't believe any of the jerkiness came from that, i believe its that the ropes equivalent of mass is too high because increasing the mass of the pendulum helps to mitigate the instability that adding rope length causes. However, i don't think this is much of an issue because i don't imagine it would be very hard to figure out how to change, instead, i would like to focus on this:

Quote:Tethers aren't used in rope


This is simply not consistent with what i've read and watched, here's a quote from the very manual you linked me, which i read before i even made this thread:

(Tether constraints)

Quote:These constraints are used to [b]reduce stretching of cloth and ropes[/b], when increasing the amount of distance constraint iterations would be too expensive. Generally 1-4 iterations are enough for tether constraints.

This is my main problem with the situation, because a major selling point for me was the tether component used on a rope in one of the videos from what i believe is your official channel, this video right here: https://www.youtube.com/watch?v=fTqSZgNwGgI

At the 6:25 mark the tutorial guide demonstrates the exact same problem i'm having right how, and at 6:41 he solves it by clicking on this button labeled "generate tether", a button which seems to have since been taken out. Increasing the substep count in the obi solver does help the problem, but even putting the substep count at 10 , 20 or 40, well beyond the point it starts to effect my performance, with any combination of high/low iteration count and relaxation, the problem still resides. When any significant ammount of tension is applied the rope stretches, and then elastic whips my object around.

I don't believe distance constraints are the solution to my problem, i believe they are the source, and i believe that your tether's were designed to fix exactly this problem;

A few side notes: 

1) It seems that in my player gravity script i did indeed forget to scale it by time.fixedDeltaTime, so thanks for helping me find that. 
2) Every now and then, my console throws a "Look rotation viewing vector is zero" at me, it doesn't seem to cause any problems, its not even classified as a warning or error in the unity console, its just a regular message like that of Debug.Log(), but it only does this when i'm using an ObiRope;
3) I also, every now and then, when increasing my rope length, get a IndexOutOfRangeException sub scripted with "Obi.ObiActor.SwapWithFirstInactiveParticle (System.Int32 actorIndex)(at assets/Obi/Script/Common/Actors/ObiActor.cs:420) error, again it doesn't cause any immediately noticeable problems, is it something i should be concerned about?
Reply


Messages In This Thread
Rope physics unstable - by earagon088 - 23-07-2020, 10:56 AM
RE: Rope physics unstable - by josemendez - 23-07-2020, 12:23 PM
RE: Rope physics unstable - by earagon088 - 03-08-2020, 07:22 AM
RE: Rope physics unstable - by josemendez - 03-08-2020, 08:22 AM
RE: Rope physics unstable - by earagon088 - 03-08-2020, 10:57 AM