I’m trying to figure out, how to get a vector between the current and previous locations of a moving object, using Geometry Nodes. And for some reason, nothing I have built so far seems to work. One thing is that it becomes unclear, whether the order of things in GN is going exactly in the sequence as needed. Because as they are there now, I bet they don’t really have left to right hierarchy uuuugh.
Hm, with modulo and some simple switch? It’s weird I can’t find any tutorials or posts on this. It seems like a very basic thing that many ppl must have been making, to measure speed etc?
I definitely see the point, that with scene time, I could sort of make a short-lived memory saved as an array. I’m just often suspicious, that my solutions are a bit redundant. Thank you for the direction!
Edit: should be said, using GN to do this is not the simplest way; we’re storing the location of the object on every single vertex of the mesh, when we only need to store it once. If all we need is the location now and the location one frame ago, the simplest way is with an empty with the same action, offset a single frame-- we can compare the locations of each, perhaps with a driven custom property.
I just got back to the computer and I tested this idea below. Which also seems to work and the backlog memory is determined by the number of indexes on the Curve Line.
Just plug the subtract node to the index input in Sample Index node. It doesn’t work because Curve Line node only accepts single values instead of fields