View Single Post
# 2 28-12-2008 , 07:34 AM
halfloaf's Avatar
Lifetime Member
Join Date: Mar 2008
Location: Bristol, UK.
Posts: 191

Constraints

Hiya,

If I understand you correctly, the best thing to do to get the centre object to always be in the middle of the outer objects would be to create an expression.

Something along the lines where;

Object Left = "object_L"
Object Right = "object_R"
Object Centre = "object_C"

These are just descriptors...your expression would be...

object_C.tx=(object_L.tx + object_R.tx)/2;
object_C.ty=(object_L.ty + object_R.ty)/2;
object_C.tz=(object_L.tz + object_R.tz)/2;

What you're doing is telling object_C (your centre object) to inherit the average value of the translate values (tx, ty & tz) of the left and right objects.

Hope that helps!

-Jacques.


Poly-pushing on a '96 SGI O2