I want to track the position and rotation of an actor that is moving along a spline and write the data into a file.
So that i get at least 25 entrys per second. This is how i was going about it for now (with the victoryPlugin19 for outputting a textfile):
of course this does only write 1 entry because the array only consists of 1. My question is if it would be a good idea to use the delta seconds to create new array entrys? Or how would i go about the problem?
Alternatively for gaming purposes you could use a delay node with 0.04 value. Put the delay node before the writing to file nodes.
Also you could write for every frame with a timecode, then just interpolate it with the needed time.
And ideally, if you want more precise results, you would have to write a c++ code that creates a separate async thread that does not depend on the framerate and fetches the data from physics thread that has async substepping enabled
the problem im having is that i can`t write exactly 60 datasets per second. Its more like 55 even through i write every 0.016667 sec into the file. Also how would i go about specific formating? Is it possible with the plugin to edit the string in a way?
If you want and exact number of datasets,make a temporary dataset (of rotation and location) each frame, store them and then interpolate the data at the end of recording for your needs (or during the recording), And the interpolated data you store as a string. With it you can achieve 25, 30, 60 (whatever number you want) with a good amount of precision. And don’t forget to close the the question if it was resolved =)