Help animate on

I have a problem with animate on, I have an array of 920 numbers and would like to put in the position of an object. but when run the code below it creates a keyframe always the last number of array ... someone could help?

pos_tst = #(221.364,221.939,222.395,222.381,222.225,222.072,222.052,225.235)
pos_tst.count
for t = 1 to pos_tst.count do
(
animate on for p in pos_tst do
at time t
(
$.pos = [p,0,0]
)
)
 
 
for p in pos_tst do 
(
print p
)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kimarotta's picture

I'm sorry to confuse ...very

I'm sorry to confuse ...very thanks

kimarotta.com.br
3d Artist  

barigazy's picture

If you think about offset

If you think about offset (key step by 5), i use this to see result better. Offset by 1 will produce faster animation. But you know that already :)
Cheers!

barigazy

barigazy's picture

little example


pos_tst = #(100,50,200,150,300,250,400,350,500,450)
objX = Box wirecolor:red
objY = Box wirecolor:green
objZ = Box wirecolor:blue
offset = 5
animate on 
(	
	for t in 1 to pos_tst.count do
	(
		at time (t*offset) 
		(
			objX.pos = [pos_tst[t],0,0]
			objY.pos = [0,pos_tst[t],0]
			objZ.pos = [0,0,pos_tst[t]]
		)
	)
)

barigazy

kimarotta's picture

Perfect, very thanks

Perfect, very thanks Barigazy...

kimarotta.com.br
3d Artist  

barigazy's picture

i change exampe, sorry

i change exampe, sorry

barigazy

kimarotta's picture

Yeah I saw ... Only a doubt

Yeah I saw ... Only a doubt ... Why the animate on need for a multiplication and not accept the direct number?

kimarotta.com.br
3d Artist  

barigazy's picture

Not undertand your question.

Not undertand your question. What multiplication?

barigazy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.