get all acceleration events since last fixedUpdate?

I’m using acceleration data to influence my physics simulation. Since I manipulate the physics simulation, I do this in the FixedUpdate (as advised here: Unity - Scripting API: Rigidbody). for precision, I would like to evaluate all of the generated AccelerationEvents. The problem is, that Input.AccelerationEvents seems to be (at least according to the docs) the list of events since the last frame (so I assume these are the events since the last Update()). How can I get the list of AccelerationEvents since the last FixedUpdate?

first, I will try to explain the problem:

Input.accelerationEvents holds all the acceleration measurements which occurred during the last rendered frame, so it is clear that you should make use of accelerationEvents list on the Update() function.

On the other hand, FixedUpdate() should be used instead of Update() when dealing with Rigidbodies… why? because if your framerate is low, there will be several physics calculations (hooked by FixedUpdate) in between of each frame render (hooked by update).

what the tempest123 wants to do, is to read the acceleration data from the sensors in order to manipulate the rigidbody physics… and here’s the problem, sensor’s data is collected in a list that gets updated once per frame (at update()), and physics might be calculated more often than once per frame (at fixedupdate())

So, I guess this is a unity limitation, and you can do any of the following:

option 1
calculate all your sensor-related physics once per frame by reading Input.AccelerationEvents, instead of doing it in the fixedUpdate.

option 2
Use the Input.acceleration(which gives you the last sensor read) on FixedUpdate.
The thing is, there might be more sensor-readings than fixedupdates, so you might be loosing some sensor readings.

you will have to try both options and see what gives better results (try to test them on low-framerate and high-framerate scenarios).

maybe theres another option, but not that I know of.