I’m trying to Instantiate an object near to the player if at all possible, can anyone shed some light on this?
Could I use:
var player : Transform; ? Then add that to the vector3 somehow?
var object : Transform;
function CreateObject()
{
Instantiate (prefab, Vector3(0, 0, 0), Quaternion.identity);
}
That creates an object at the origin, replace Vector3(0, 0, 0) with something like player.transform.position + Vector3(4, 1, 0) as long as you replace prefab with object.