1
$\begingroup$

I'm creating a simulation in blender whereby the objects move randomly, but where the code I have attached applies.

At the moment, they are stationary.

The code I have attached basically states that when in a given distance within each-other, objects can spawn at their location.

Dnapolymerase is an object which upon reaching a certain radius between nucleotides, can spawn nucleotides at their location. Almost like the snake game? Where snake eat apples and grow longer.

I'm hoping to get the same kind of result in this simulation, without using physics in the game engine or using keyboard sensors. The movement must be completely random.

Random movement was achieved in the previous code I had, most likely by looking at nearest.worldPosition or something like that, but I'm not sure how I can apply that to the code I have.

Any help would be amazing.

(I've attached all relevant code/video and if need be I can send you blend files of my script)

This is probably going too far, but I'm willing to literally pay someone to help me. I'm not kidding. I am prepared to do this.

The code I'm working with for this function

The link shows a video which depicts how I would like the objects to move (tinyurl)

$\endgroup$

closed as unclear what you're asking by Monster, Timaroberts, Duarte Farrajota Ramos, JakeD, Ray Mairlot Feb 16 '17 at 12:46

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ What exactly is you question? $\endgroup$ – Monster Feb 15 '17 at 7:23
  • $\begingroup$ I think the best way to do this is by assigning your main function to a frame change handler. This way your simulation can be executed by starting the animation, and you will also see the result live in the viewport. This is a good example on how to set up a frame handler: blender.stackexchange.com/questions/7904/… $\endgroup$ – TLousky Feb 15 '17 at 14:47