05-28-2022, 09:42 AM
Hi.
Currently, I am updating all CPs every frame with the following code.
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.
Thanks.
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.