gameobject instantiates with offset code example
Example 1: instantiate offset unity
if ( structureIndex == 0 )
{
var offset : Vector3 = new Vector3(0.5f, 0.5f, 0);
Instantiate(allStructures[structureIndex], lastHitObj.transform.position + offset, Quaternion.identity );
}
Example 2: instantiate offset unity
public GameObject objectPrefab;
void Start()
{
Instantiate(objectPrefab, objectPrefab.position, objectPrefab.rotation);
Instantiate(objectPrefab, Vector3.zero, Quaternion.identity);
Instantiate(objectPrefab, objectPrefab.position + (Vector3.up * 1.63f), objectPrefab.rotation * Quaternion.AngleAxis(30.0f, Vector3.up));
}