I know i can parent an instantiated sword, weapon etc to bones, though what about objects that are in the vicinity of the player? How can i get those objects to keep the exact same distance relative to the player when he moves and rotates around? Is there a way to calculate the transform of where the object is instantiated relative to the player and keep the object that distance and angle from the player when he moves around? Does that make sense? Like if the player summoned a ball of light or something and it always followed the player around.
I once did a player a little fairy floating above players right shoulder. I attached empty game object to the bone and move it up. Than in the Fairy script I set that game object as target and simply did move to and look at with some damping so its smooth. I moved the object a little bit above the head so I never got problems with fairy flying through player head.
Than I checked distance to target few times a second, if it was above some distance I trigger the move to and look at actions. I added some randomness to distance and damping to add some variety to fairy moves.
here reference:
http://docs.unity3d.com/ScriptReference/Vector3.MoveTowards.html
http://docs.unity3d.com/ScriptReference/Transform.LookAt.html