Search public documentation:
In UE3, it is often desirable to attach objects together in your level. One example might be attaching a light to a moving lift, or a particle emitter to a crane, or a mesh to the bone of some animated character. This document tells you how to set this up in the Unreal Editor.
The first thing to keep in mind is that any actor that is 'static' cannot move in the game, and you should not try to attach these to something else, as it will not work. For example, you shouldn't try and attach a StaticMeshActor to something, but should use a Mover (aka InterpActor) instead. The same goes for lights - use a PointLightMovable instead of a PointLight.
Actors have a property called Base, in the Attachment section. This is the Actor that they are 'based' on - or 'attached to'. If you want to attach Actor A to Actor B, the easiest way is the following:
- Select A.
- Press the 'lock' button on the property window, to keep that window displaying A's properties when you select different Actors.
- Select B.
- Open up the Attachment section and select A's Base property.
- Click the green arrow to assign the currently selected Actor (B) to that property.
Note that using the Base pointer does not work on Actors that are using PHYS_RigidBody. To connect an Actor that is using physics simulation you will need to use a joint (also known as a 'constraint'). There is more information on this on the VtmConstraints page.
It is also possible to attach an Actor to a specific bone of another Actor's Skeletal Mesh. This can be particularly useful for cinematics - attaching a weapon to an animated characters hand for example. You do this by first setting the Base pointer as explained above. Then you enter the name of the bone that you want to attach to into the BaseBoneName property, also in the Attachment section. When you select the attached Actor, you should see the green line and box as before, but it should be around the specific bone this time. This lets you easily check that you have the bone name correct. You can use the AnimSet Viewer to find the names of bones in a particular Skeletal Mesh - just double-click on it in the Browser.
Before QA_APPROVED_BUILD_JULY_2008, bShadowParented would only shadow parent to BaseSkelComponent.
As of QA_APPROVED_BUILD_JULY_2008, the bShadowParented flag will shadow parent to BaseSkelComponent if it is valid, otherwise it will cause all shadow casting components of the current actor to shadow parent to the first shadow casting component attached to the Base actor. This causes all the previously mentioned components to cast the same shadow, which is more efficient for rendering and avoids double shadowing where the object shadows overlap.
There are two attachment mechanisms in UE3.
Matinee should correctly handle objects based on other objects. When you keyframe an Actor which is based on something else, the movement information is considered relative to the base. In this way it is easy to set up Actors that move relative to other Actors (eg. doors on a train). Also, attached Actors should update in realtime as you scrub movements and animations in Matinee. The important thing is that you set up your attachments before you start keyframing them using Matinee. Doing this after you have set up a movement track may produce confusing results.