ok, so nowhere in any of these scripts to I touch own.localScale etc.
the objects that are following are following via python,
each object is scaling smaller the next…
like this http://en.wikipedia.org/wiki/Golden_spiral
Crawler2.blend (485 KB)
You’re scaling the objects’ orientation matrices. I’m not quite sure what you’re trying to accomplish with this line.
own.worldOrientation = ((own.worldOrientation*127)+Trot.worldOrientation)*0.0078125
Generally you should only rotate orientation matrices and avoid doing basic operations on them like addition and multiplication.
If you want a quick fix, you can just add
after that line. However, If you’re just trying to get the objects to face the direction they’re moving, I would recommend getting rid of that line doing something like this.
The scale transformation involves the diagonal of the matrix ([0,0], [1,1],[2,2]).
Edit: this belongs to the orientation transformation, which must be multiplied with the current transformation matrix. I’m not sure if the result is a scale on each single component. It might be.
I was trying to add up and then get a average of matrices, however I think It my be wise to change the orientation into vectors first,
however I have not tested it yet.
from mathutils import Vector
Trot = scene.objects[own['target']]
offset= Trot.worldPosition +(Trot.worldOrientation*offset)
own.worldPosition = ((own.worldPosition*127)+offset)*0.0078125
works just fine,