What youâre missing is the import of System.Linq. Please add this somewhere next to existing usings:
using System.Linq;
The FirstOrDefault is an extension method thatâs defined in the Linq namespace. We forgot to mention this in the example. Iâll make sure this gets fixed.
Also does this example cover rotation reconciliation or just position? If not how would you add that?
I believe the approach would be identical to position - youâll want to find the ârotationâ binding (make sure it is bound via CoherenceSync configuration first) and subscribe to its sample receive event. Then in the callback you can calculate the difference in angle between predicted and received values and make a correction if needed.
Hi AceGames. Apparently the sample on that page is a bit outdated, as the Action youâre listening to has a new signature. (as you can see from the error message youâre getting)
Instead of:
private void DetectMisprediction(object sampleData, long simulationFrame)
try:
private void DetectMisprediction(object sampleData, bool stopped, long simulationFrame)
(you can ignore that incoming stopped parameter for now).
And Iâll fixI fixed the docs, so we donât get this issue again⊠sorry for the inconvenience!