How do I offset a link in time?


#1

[font=Arial][/font]
Hi There
Can any one here come up with a suggestion on how to achieve an offset in time between two linked objects?

The Case is
I want to link two objects but with the ability to offset the child in time (IE a five frame delay).
So that IE the Child object appears to lag behind the Parent (without any spring like effect) just a straight lag.

Its important that the link continues to stay dynamic. So that I can edit the parent animation and have the child update automatically.

Does anybody know a script command or tool that has this ability?

Thanks


#2

If Obj1 is the Parent and Obj2 is the Child. Then to assign a 5 frame delay to the position you would want to use a Script Controller on the Position of object to follow (Obj2). Create Variable Name: LinkObj. Press Create. Select LinkObj from the Variables List. Press Assign Node (choose Obj1). In the Expression window enter:

at time (currenttime - 5f) (LinkObj.position)

Press Evaluate. That should be it. The same can be done for Rotation and Scale if needed.

-Eric


#3

PiXeL_MoNKeY / AKA. Eric

Your are my Hero :thumbsup:

Thanks

Ps. Just on a side note.
Do you know if it can be done in an Expression aswell?


#4

Yes it can be done through the Expression controller. Obj2 Position Controller > Expression Controller. Create > Variable Name: LinkObj, Vector (this gives you access to position controllers rather than the position controller components), Tick Offset: -800 (160 ticks = 1 frame, so this sets the position 5 frames behind Obj1). LinkObj > Assign to Controller > Obj1.position.

Expression:
  LinkObj

Evaluate. Done!!!

Hope this helps,
-Eric

Edit: Just to note. That both Script and Expression controllers offer the tick offset feature. Also, if you want to handle Position/Rotation/Scale at the same time you can apply a Transformation Script to the Transform Controller. If you have any more question just ask.


#5

Thanks Eric

But unfortunatly I didn’t eplain myself well enough. I ment Epressions like the ones that connect through the wire menu.

IE. I wire up obj02.X_Position to obj01.X_Position.

The obj02 X_Position Epression would then be plain “X_Position” (of obj01) and I could go in and add a physical 150 unit offset with this addition “X_Position + 150”

What I would like is, if I could change this expression to something like

“time(-5 f) X_Position”

and then it would offset the specific axis in time.

Don’t bother, if you have to research or anything like that, as I am more than happy with the information you already provided.

Thanks Again


#6

Using Wire Parameters won’t get you anything as you will still have to use:

at time (currenttime - 5f) $Obj01.position.x

As the expression to offset the X_Position for Obj02.

-Eric


#7

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.