Skip to main content
Up and Coming
March 13, 2013

Using SensorFusion Prediction

Hey Rift Peeps.

I'm interested in making use of the C++ SDK's SensorFusion prediction feature and I had a couple of questions:

1. What are the units for the SensorFusion::SetPrediction()'s dt parameter? Is it in seconds, or ms? I thought of using SensorFusion::GetPredictionDelta() to determine this, but by default it returns a value of 0, so I couldn't guess on the units.

2. I assume that I should be using SensorFusion::GetPredictedOrientation() rather than SensorFusion::GetOrientation() when I want to use the predicted value?

None of the C++ examples make use of SensorFusion prediction so I didn't have anything to reference. I see that the Unity demo does allow you to adjust the prediction amount, so that may be something to add as an option to the C++ demos too, just for an example of usage.

Thanks!

- Dave

    4 replies

    Participant
    March 14, 2013
    The prediction value is in seconds; a value such as 0.04f can help the experience - it's good to keep it a bit lower then overall latency though. You'll indeed need to call GetPredictedOrientation() to get the result. Sorry for lack of information here; we''ll update the comments and will plan to add it to the sample.

    Thank you,
    Michael
    Up and Coming
    March 14, 2013
    Thanks for the info, Michael. I can now move forward with adding sensor prediction to Torque 3D.

    - Dave
    Torque 3D, open source game engine Torque 3D Game Development Cookbook
    July 25, 2013
    Just a quick note:
    As of v0.2.3 of the SDK, the documentation still doesn't mention any of this (you only find it by studying the demo applications). Given the dramatic impact motion prediction has on perceived latency, it would be great if this could be added to the documentation.
    Up and Coming
    July 29, 2013
    I wouldn't have known about this if you hadn't resurrected this thread sth, thanks! You're right, this is not very well documented.