Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I want SetLocalPositions to update all CPs at once.
#1
Hi.

Currently, I am updating all CPs every frame with the following code.

Code:
for (int i = 0; i < s_SplinePath.ControlPointCount; i++)
{
    s_SplinePath.ControlPointsList[i].SetLocalPosition(s_PositionBuffer[i]);
}

s_PositionBuffer is a Vector3[].
SetLocalPosition() internally calls SetSynchronizationPositionAndRotation() in CurvyConnection.cs, and if Vector3s in s_PositionBuffer have changed, this processing occurs each time.

In order to minimize the processing load, I would like to have a method that can be set all at once as follows.

Code:
s_SplinePath.SetLocalPositions(s_PositionBuffer);

Thanks.
Reply


Messages In This Thread
I want SetLocalPositions to update all CPs at once. - by yanke - 05-28-2022, 09:42 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Calling Update with defined deltatime Marco Schultz 3 8 01-25-2023, 01:58 PM
Last Post: _Aka_
  Update - Which folder to delete Marco Schultz 3 8 04-26-2022, 05:00 PM
Last Post: _Aka_
  CurvyConnection Update Overhead wingednosering 10 919 10-13-2021, 05:23 PM
Last Post: _Aka_
  Lots of Allocs in Editor Update (Poor Performance in Editor) TdayMFG 4 3,151 02-06-2020, 10:13 PM
Last Post: _Aka_

Forum Jump: