Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Only render ropes
#11
It's hard to tell what might be happening without seeing the full code.

- When are you updating particle positions? (FixedUpdate(), Update(), etc)

- I assume you're storing rope.solverIndices in the synchronizedData.Indeces array? this doesn't seem like a good idea to me, as nothing guarantees the solver indices will be the same in both the "client" and the "server". Unity calls Awake() Update(), etc in an undefined order for different objects, so if the Awake() order changes in the client vs server, the ropes will be added to the solver in a different order and their indices will change. A better approach would be to work with actor indices (from 0 to number of particles in the rope) as they can't change.

- The rope renderer uses solver.rendablePositions, not solver.positions, so if the solver is disabled you will need to write positions into that array. The renderable positions might or might not be interpolated depending on the solver interpolation settings: if it's disabled, they will be the same as positions. If not, they will be interpolated from the last step and the current step positions. See:
http://obi.virtualmethodstudio.com/tutor...icles.html

Quote:If the solver's interpolation mode is set to interpolate, solver.renderablePositions will contain temporally smoothed-out positions that won´t coincide with the actual particle positions at the end of the simulation step. That's why they are called "renderable": they are only used to guarantee smooth rendering, but they aren't fed back into the simulation.
Reply


Messages In This Thread
Only render ropes - by Jesse - 11-03-2021, 09:30 AM
RE: Only render ropes - by josemendez - 11-03-2021, 12:00 PM
RE: Only render ropes - by Jesse - 11-03-2021, 02:07 PM
RE: Only render ropes - by josemendez - 11-03-2021, 02:47 PM
RE: Only render ropes - by Jesse - 11-03-2021, 03:00 PM
RE: Only render ropes - by josemendez - 11-03-2021, 03:52 PM
RE: Only render ropes - by Jesse - 11-03-2021, 04:15 PM
RE: Only render ropes - by josemendez - 11-03-2021, 04:37 PM
RE: Only render ropes - by Jesse - 11-03-2021, 04:43 PM
RE: Only render ropes - by Jesse - 12-03-2021, 11:17 AM
RE: Only render ropes - by josemendez - 12-03-2021, 11:25 AM
RE: Only render ropes - by Jesse - 12-03-2021, 02:41 PM