Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solver is too performance heavy
#11
(04-06-2025, 02:16 PM)josemendez Wrote: Hi,

Your code seems correct to me, assuming the value of the "solverIndex" variable is correct. How are you calculating it? Also, you mention the rope disappears after adding the batch, are you getting any errors in the console as well?

kind regards

No, there is no errors in console, the rope is just disappeared and all joints is become unattached to the rope. SolverIndex variable is correct, I've checked it several times. Also I've tried the code from previous reply with only one batch, and the end of the rope just attached to solverIndex position on the rope - maybe this behavior tells you something.

Kind regads,
Reply
#12
(04-06-2025, 05:15 PM)quent_1982 Wrote: No, there is no errors in console, the rope is just disappeared and all joints is become unattached to the rope. 

Kind regads,

I'm unable to reproduce this behavior. Just tried your code, substituting "solverIndex" with some values in the rope.solverIndices[] array and it works correctly.

Would it be possible for you to share a scene/package that reproduces this problem (by sending it to support(at)virtualmethodstudio.com) so that I can take a closer look?

(04-06-2025, 05:15 PM)quent_1982 Wrote: SolverIndex variable is correct, I've checked it several times.

I asked because assuming the solverIndex variable is indeed the index of a particle in the solver, "solverIndex+1" doesn't make any sense - the solverIndices array might contain *any* particle index values, not just consecutive ones as explained in the manual. So solverIndex+1 is certain to be incorrect. Assuming you want the "next" particle in the rope you should use solverIndices[actorIndex+1] instead.

(04-06-2025, 05:15 PM)quent_1982 Wrote: Also I've tried the code from previous reply with only one batch, and the end of the rope just attached to solverIndex position on the rope - maybe this behavior tells you something.

Your code already only has one batch, with two constraints. Do you mean only one constraint? in that case, which one you omitted to get the rope to attach?

kind regards
Reply
#13
(04-06-2025, 05:30 PM)josemendez Wrote: I'm unable to reproduce this behavior. Just tried your code, substituting "solverIndex" with some values in the rope.solverIndices[] array and it works correctly.

Would it be possible for you to share a scene/package that reproduces this problem (by sending it to support(at)virtualmethodstudio.com) so that I can take a closer look?


I asked because assuming the solverIndex variable is indeed the index of a particle in the solver, "solverIndex+1" doesn't make any sense - the solverIndices array might contain *any* particle index values, not just consecutive ones as explained in the manual. So solverIndex+1 is certain to be incorrect. Assuming you want the "next" particle in the rope you should use solverIndices[actorIndex+1] instead.


Your code already only has one batch, with two constraints. Do you mean only one constraint? in that case, which one you omitted to get the rope to attach?

kind regards

Hello, I attempted to replicate the issue in a test project, but the rope does not disappear. I will send you the test project as soon as I determine what is causing this.

Kind regards.
Reply