For some reason every time I look for this I never seem to find anything close. Maybe I'm bad with search engines so I hate asking questions I feel must have been answered. What I'm trying to do is instantiate a prefab using a child of the callers location/rotation. In this case for shooting but seems like it'd work for lining up attachable objects. Though I know it can't be terribly complex how do I set that? In this case I don't want the "missile" to be a child but knowing how to do that would be nice too.
This is what I have pulled from an example...works aside from firing from the character models feet.
var projectile : Rigidbody; var speed = 20; function Update() { if( Input.GetButtonDown( "Fire1" ) ) { var instantiatedProjectile : Rigidbody = Instantiate(projectile, transform.position, transform.rotation); instantiatedProjectile.velocity = transform.TransformDirection( Vector3( 0, 0, speed ) ); Physics.IgnoreCollision( instantiatedProjectile. collider, transform.root.collider ); } }