#cloning prefab

1 messages · Page 1 of 1 (latest)

wispy sierra
#

@latent violet so the one that instantiates it

#

so it gets instantiated always at the same position

latent violet
#

Change that position

wispy sierra
#

but the player moves

latent violet
#

So? Use that position then

wispy sierra
#

ye but thats the point how do i get the pos of the player into the code of the bullet

latent violet
#

You just want to spawn the bullet at the player's position right

wispy sierra
#

or is there some kind of instantiate at

#

ye

latent violet
wispy sierra
#

but instantiate(bullet).at(x,y) or a kind of thing

wispy sierra
#

sorry for being so dump but exactly do i get the coordinates in

instantiate(bullet, position??)

latent violet
#

Pass in the position and rotation you want to spawn the object at

wispy sierra
#

@latent violet Instantiate(bullet, x,y,0,0,0,0);

this didnt work... do i have to declare the pos/rotation somehow

latent violet
#

please read the documentation