The Attach component allows you to attach objects to any wire in your scene, useful for adding say birds to your dynamic wires.
To use just add the MegaWireAttach component to the object you want to hang on a wire and then select the wire object in the scene. The Alpha value will control the position along the wire.
Attach Params
Wire
The MegaWire object in the scene you want to hang this object on.
Alpha
How far along the length of the wire object you want to hang your object, 0 is the very start, 1 the very end.
Strand
If your selected wire object has multiple strands you can choose the right strand by changing this value.
Offset
An offset value to use to help position your object correctly.
Align
Ask the system to align the object along the wire, if your wire sags a lot then you may want to turn this on.
Rotate
An extra rotation value to help you orientate your object as you need it.
Attach Video
Attach Class
Below are the public members of the MegaWireAttach class that you can control from script or via the Unity Animation system etc.
{
public MegaWire wire;
public float alpha;
public int strand;
public float offset;
public bool align;
public Vector3 rotate;
}
You must be logged in to post a comment.