Notifications
Clear all

[Closed] some help needed with simple script

Well, here’s the script that should create a key for a simple box at every frame and position the box to another picked object. Basicaly I need to fake the real link opereation for my animation, by using only keyframes.

You may ask why, but I am having some problems with reactor. read more here: http://www.cgtalk.com/showthread.php?s=&threadid=134928

it works great with simple objects rotating about only one axis at the time, but when these start rotating about more axes at the time it just doesn’t do the right thing. What could be the problem?

thanks

(
rollout Create “Select Object”
(
pickbutton pick_obj “Pick Object”

on pick_obj picked obj do 
	(
	myBox=box height:2 width:10 length:30 pos:[0,0,0]
	set animate on
	for i=0 to 100 do
		(
		frame=i
		slidertime=frame
		
		x=obj.rotation.x_rotation
		y=obj.rotation.y_rotation
		z=obj.rotation.z_rotation
		
		rot_box=eulerangles -x -y -z
		
		mybox.pos = [obj.pos.x,obj.pos.y,obj.pos.z]
		)
	)
)

createdialog create 250 100
)