12-03-2021, 11:17 AM
Hi Jose, sorry to bother you again. I still can't get the rendering to work by setting the solver positions and velocities through SetVector3() and calling ObiRope.Interpolate() afterwards. Here's the code snippet:
I've found that some of the particles (what looks like the first 10 or so) do get set correctly with the VelocityVisualizer script, I can see the visualized velocities for these particles. The ObiParticleRenderer does not show the updated positions, it seems to flicker on and off. This might be an issue in my networking code, however the mesh is not updated.
ObiRopeExtrudedRender.UpdateRenderer() does run, so I'm not sure what I'm missing..
Here's a video, this is with the solver disabled:
Code:
for (int i = 0; i < synchronizedData.Indeces.Length; ++i)
{
_obiRope.solver.positions.SetVector3(synchronizedData.Indeces[i], synchronizedData.Positions[i]);
_obiRope.solver.velocities.SetVector3(synchronizedData.Indeces[i], synchronizedData.Velocities[i]);
}
_obiRope.Interpolate();
I've found that some of the particles (what looks like the first 10 or so) do get set correctly with the VelocityVisualizer script, I can see the visualized velocities for these particles. The ObiParticleRenderer does not show the updated positions, it seems to flicker on and off. This might be an issue in my networking code, however the mesh is not updated.
ObiRopeExtrudedRender.UpdateRenderer() does run, so I'm not sure what I'm missing..
Here's a video, this is with the solver disabled: