How to rotate like baseball with x,y,z data

You can look into this video, bat initial position is -6 or -8 on the x axis, and bat then reached around -35 on x axis and then it move forward and it reached +40 in x axis, how this can be done programmatically.
Basically we will save all the matrices data from sensor and then load it from database and then model will change accordingly.
Right now can choose some static data to start and later will load it from remote.
How to do that?

100000001274037--1290690--ezgif-2-329a2c69d6.gif

Your previous post was moved out of physics and you would have had a notification saying that it doesn’t relate to physics but you’ve now made a duplicate post again in physics.

Please don’t make duplicate posts and again, asking about how to use the Transform system isn’t related to physics.