#Reset state of PredictedObject

2 messages · Page 1 of 1 (latest)

clever quest
#

I have an issue with SetInterpolation method of PredictedObject.
I need to disable interpolation when player picks up an object and switch it back to 1 when they drop it.

if (target.TryGetComponent<PredictedObject>(out var predictedObject)) {
    predictedObject.SetInterpolation(0, true);
}

If I skip this step, it won't work, because player has CSP and I make the picked up object a child of the player and it is moved by SCP meanwhile.

When player drops the object, after set interpolation back to 1

predictedObject.SetInterpolation(1, true);

it interpolates it from the place when it was when I disabled it (picked up).

How can I reset this state? Or maybe I do the whole feature completely wrong.

wary folio
#

Will have a look tomorrow. Seems like something that needs to be added in. Please file a bug report. @clever quest