- Home /
How can I use a script to interact with an instantiate Object?
How can I use a script to interact with an instantiate object, for example: I have a figure controlling script that wants to grab two positions from an instantiated weapon for hand holding position. How can I reach that goal?
Do you already have the weapon as a gameobject in your scene? Then you can access it via GameObject.Find("NameOfTheWeapon"). To get the actual hand position, you would need to store it in some way in the weapon GO. For example a fixed position offset, or as a child object
Your answer
Follow this Question
Related Questions
position.Set vs. position = new Vector3() 0 Answers
Unfreezing rotation causes the position and rotation go crazy 0 Answers
Help with this script? Keeps moving my objects around in run-time? 0 Answers
Change coordinates of children and grandchildren of gameobject in panel 1 Answer
Cube trigger not changing position 0 Answers