Little Video showing the tank spinning and tracks staying as they should be: :spin:
It’s me playing the guitar by the way, perhaps I should stick to the day job, not that I have one…
It seems that I must use the Execute Trigger settings in AN to prevent objects moved by “delta” distances from getting out of sequence. I will look at the main system with the curves, tomorrow, once I sober up. :yes:
Here’s the node tree for this video:
And the script code, this does not do everything, just straight lines and spinning:
if frm < 2:
obj.location.x = 0
obj.rotation_euler.z = 0
trk_l.location.x = 0
trk_r.location.x = 0
else:
obj.location.x = obj.location.x + delta
obj.rotation_euler.z = obj.rotation_euler.z + (-rad * 1.25)
trk_l.location.x = trk_l.location.x + delta
trk_r.location.x = trk_r.location.x + delta
if rad > 0:
trk_l.location.x = trk_l.location.x - (rad * wid)
trk_r.location.x = trk_r.location.x + (rad * wid)
Note that the tracks & turret are zeroed at the start of the animation, you cannot run these “delta” animations backwards and expect objects to return to their start positions, “obj” is the tank turret BTW. :no:
Simple stuff for these options, needs a bit more code to follow a curve, that you will get later, once testing is complete. :eyebrowlift:
Cheers, Clock. :RocknRoll:
Now, I am going to sleep-off the booze…