Margus Voll wrote:Parenting or linking... Went over manual but at first did not find it.
I just went through this last week, and here is how I connected a pEmitter to the wing of a jet fighter:
1. Put the jet (any object really, this is the parent) into a Merge3d.
2. Using expressions, put what ever you want to connect (mesh, object, pEmitter, what ever this is the child) into the exact same location using expressions. Put an "=" in the value box and a expression edit box appears. Use the "+" and drag it to the appropriate value in the "master" The expression will look something like this:
Jetlocation.Transform3DOp.Translate.X
Jetlocation.Transform3DOp.Translate.y
Jetlocation.Transform3DOp.Translate.z
Now both pivot points are the same. But what if you don't want the object at the pivot point? Then we add an offset. For example with the jet example, this puts the pEmitter into the center of the jet. Not where we want it.
So we add an offset to the expression, so for my jet example to put the pEmitter on the wing tip I added the offset to the expressions I just created:
Jetlocation.Transform3DOp.Translate.X + .6
Jetlocation.Transform3DOp.Translate.y - .05
Jetlocation.Transform3DOp.Translate.z
But now the pivot point is not in the right place!!! So use the pivot slider to move it back. To get it in the exact same position, what ever offset you added to the translation expression (Jetlocation.Transform3DOp.Translate.X + .6) You do the opposite in the pivot. So for this example I would change the pivot for the child to -.6 in the X and +.05 in the Y.
Last, link the child's x,y, and z rotation to the parent (again using expressions). Now your child will stick to to parent. No matter how you move or rotate it. I also am using the same procedure to lock a missile to the jet fighter, and the rocket exhaust from the missile.
Let me know if that made sense or not. I will whip up a code example and share it if it didn't.