General Category > ASL Scripts

Anim8ing a Tank Tread

<< < (2/3) > >>

almost cool:
whoops.script error. :-\

out of bounds memory error in script. ???

NickE:
That error can happen when you have forgotten something important.  Did you follow the instructions as given in the tutorial in the first post of this topic?  It is essential that you have set up the attributes properly.

almost cool:
alright ill try again

Arik_the_Red:
Digging into this great old script... NickE, I came up with this effect when I finally got my tread facing the right direction...



I am not in touch with things enough to think through what might cause that effect. Any ideas?

File attached for your review as well.

NickE:
Arik,
Sorry it took me so long to get to this...

I looked at your attached file and there are several reasons why you are getting this behavior.

1) The script looks at the path and reads the orientation of path at the points where it is going to copy the "copytarget".  If you adjust the individual points on the path in different views, you can inadvertently change the orientation of the path in totally unpredictable ways.  For treads (and similar things), I used the Build->Primitives->N-gon to make a circle and then stretch it out.

2) Your "target" object's pivot was at the origin of the screen rather than in the center of your object.  Your object's orientation is measured from this pivot.  The only way to move that is using the Object/Axis button and manually moving it to the center of the object.

3) Your "target" object's origin was also at the screen origin, rather than your point zero.  I have attached a script that will "fix" the internal coordinates to the apparent coordinates of any highlighted mesh.

I have also attached the original project with an additional object containing the fixed path and object so that the scripts work properly.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version