Here's the code:
public var weapon:GameObject;
public var weaponBone:Transform;
function Start ()
{
// instantiate the weapon prefab
var weaponTransform:Transform = Instantiate(weapon, weaponBone.position, weaponBone.rotation) as Transform;
// make the bone a parent of the weapon
weaponTransform.parent = weaponBone;
}
My question is how i can set the hand bone to that "weaponBone" dynamically, because my player spawns not stands in the world already. Thanks in advance
↧