#Instantiatng at set vector2

1 messages · Page 1 of 1 (latest)

nimble finch
#

Hello I am trying to set an Vector2 on a gameobject and then spawn a prefab and one child to spawn at the set Vector2. Its a little hard to explain but basically I want to spawn a prefab so that the child line up with a gameobject and I am wondering how I can do that easy.

steep roost
#

I don't know if I understood the question right, but child.transform.localPosition = Vector2.zero ?

nimble finch
#

nope figured it out
transform.parent.position = transform.position + new Vector3(10, 0, 0);
and btw how do I make that square when you do the code?

grizzled atlas
delicate moss
#

And you can additionally add syntax highlighting by adding the shortcode (or sometimes the full name) of the language you're using at the end of the first three backticks (e.g. cs for C#):