PDA

View Full Version : some help needed with simple script


ghoul
04-02-2004, 06:49 PM
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
)

--------------------------------------------------

CGTalk Moderation
01-17-2006, 11:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.