Quantcast
Channel: Answers for "Unity instantiated object not sticking to its parent?"
Viewing all articles
Browse latest Browse all 4

Answer by DerickTP

0
0
Hi, as I understand it, just Instantiating the object using the coordinates doesn't put the object in the players hierarchy. You need to set its parent to be the player. GameObject item = GameObject.Instantiate(inventory[selected], transform.parent.position, transform.parent.rotation) as GameObject; item.transform.parent = gameObject.transform; should do the trick (at least, something in the line of that). There might still be some problem, though but I am not sure.

Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images