Set rotation of GameObject

Options
Hi ,
I have simple question. I tried convert this non-deterministic code:
Quaternion fromRotation = transform.rotation;
Quaternion toRotation = Quaternion.Euler(0, 0, angle);
transform.rotation = Quaternion.Lerp (fromRotation, toRotation, turningSpeed * Time.fixedDeltaTime);
..to TrueSync-deterministic:
//Get present rotation of GO
TSQuaternion fromRotation = GetComponent<TSTransform>().rotation;
//Set final rotation
TSQuaternion toRotation = TSQuaternion.Euler (0,0, angle);
//PROBLEMATIC line, when GO have to slowly turn from actual position to a new position
GetComponent<TSTransform2D>().rotation = TSQuaternion.Lerp (fromRotation, toRotation, turningSpeed * Time.fixedDeltaTime);
But it gave this error..
image

So, how can I make the deterministic code work like the non-deterministic one?
Please help, I will be glad for any kind of help :)

Best Answer

Answers