Hey !
I need help with instantiate a prefab(dirt block) like 10 units in front of my character.
With my script below, they spawn too close to each other, there’s absolutely no space in between.
My game is in 2D and the dirt blocks are sprites.
Can anyone help me out ?
void Update()
{
Instantiate (dirt, new Vector3(player.transform.position.x + 10f, -5.237257f + 0.5572577f, 0), Quaternion.identity);
}