Programming a loop in frames

I made this in Unity, and I would like to move it to Blender and make it look good.

It’s really just 25 lines of simpe code, along “Look At”, “Push Rigidbody”, the rest is constraints and what is given for free by the pysics engine.

I’m well experienced in Unity programming, and in Blender apart fom coding… I have not made any real code for Blender, especially not any that would run over frames as a continiued physics simulation.

I can learn Python, I guess, it does not seem that hard, but I need to “crack tthis nut”:

Would any one out there be able to just write a simple couple of lines that would push a capsule collider forward in a loop, maybe register distance to another object and place that in a variable?

That would be an awesome starting point for me, I think I could take it from there.

Thanks a LOT!

Blender can’t do physics in the viewport, so you would need to run your own physics simulation. If you already have a result in Unity that you like it would probably be easier to write keyframe information to json and then import it into Blender.

Hmm thanks!!