Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
handles on Obi Rope cause twitching
#6
(11-04-2018, 08:34 AM)josemendez Wrote: You can check it by looking at Unity's profiler, to see if there are frames where FixedUpdate is being called multiple times (the amount of times for each function call is one of the columns in the profiler).

If you're still experiencing twitching in 3.4, I'm most certain it is due to a different reason because handles have fundamentally changed. Specially since you mention it happens in LateUpdate too (if it was due to the original bug, it wouldn't happen at all in LateUpdate mode).

Can you share more details on your scene?:
- Does the twitching stop if you disable collisions in the solver?
- Are the rope handles inside the objects they're attached to?

My profiler said 1 call per frame.
Ok here is more details.

Here is a screenshot of my Obi Solver settings: https://i.imgur.com/1sWc51W.png As you can see my collision is turned of.
Here is a screenshot of my Obi Rope settings: https://i.imgur.com/eGXZPq0.png

I have a rope that has maybe 20 particles from the beginning. The first particle and last particle has a handle each. So I can set that start and end of the rope via the handles. I have the start handle parented under my player which moves via the CharacterController.Move(..) method. The end handle is just parented to the scene (parent = null) and is moving by a scripts Update method via manipulating its transform position.

When I move around with the character the rope twitches at the start handle (the one parented to the player) but it does not seem to twitch at the end handle. It looks like the rope resets to the start handles position every second or so, almost like it is updating too slow or something.
Does it matter where the actual Obi Rope gameobject is (the one with ObiRope, ObiSolver, MeshRenderer Components)?

Also I have an idea on how to "fix" this. Is it possible for you to help me make the reverse of this function found inside "ObiActor.cs":
Code:
public Vector3 GetParticlePosition(int index)
{
     if (InSolver)
     return solver.renderablePositions[particleIndices[index]];
     else
     return (ActorLocalToWorldMatrix * initialScaleMatrix.inverse).MultiplyPoint3x4(positions[index]);
}

I want to be able to SetParticlePosition(int index, Vector3 newWorldPosition).

This way I can set the start and end particle position without using handles?
Reply


Messages In This Thread
handles on Obi Rope cause twitching - by khalvr - 06-02-2018, 03:52 PM
RE: handles on Obi Rope cause twitching - by Semih - 11-04-2018, 08:53 AM