Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Rope Attachment on dynamic rope length and Stitching questions
#11
(06-11-2023, 04:01 AM)Balou Wrote: I know it's an old thread but the issue is back and the images are still relevant. 
I updated the plugin recently and I've got the exact same issue about the renderablePositions doing these weird things. I can still see the rope switching between 2 positions if I'm using rope.solver.OnInterpolate, and doing nothing if I'm using rope.OnInterpolate.

Hi,

ObiBones update rendering by write particle data to the bone transforms in their Interpolate() method, right before calling the actor's OnInterpolate() event. So there's a slight difference between using solver.OnInterpolate and rope.OnInterpolate, and that is that the solver's one takes place before rendering is updated in each actor's Interpolate() by copying particle positions over to the skeleton bones.

Quoting the documentation:
http://obi.virtualmethodstudio.com/manua...olver.html
Quote:OnInterpolate: Called at the start of the updater's Interpolate(), after all simulation for the current frame has been performed and particle positions have been interpolated, but before updating rendering components.

So if your code modifies the solver's renderablePositions, it must be done in solver.OnInterpolate. If you do it in rope.OnInterpolate it will be executed after rendering has been updated, so any changes you make to rendering data such as renderablePositions will be completely ignored.

As to why the rope is switching between 2 positions, I'm not entirely sure. The code I shared in this thread still works fine and haven't been able to reproduce anything similar myself, so there must be something else going on in your project. Would it be possible for you to share it with us (by sending it to support(at)virtualmethodstudio.com) so that I can take a closer look?

kind regards,
Reply


Messages In This Thread
RE: Rope Attachment on dynamic rope length and Stitching questions - by josemendez - 06-11-2023, 10:08 AM