|
Whenever I instantiate the Prefab, it doesn't spawn at the position of the sphere but at (0,0,0). why is this? in my script I used "...GameObject.Find("Spawner").transform.position..."
(comments are locked)
|
|
Make sure your script can actually find the Spawner objects first. print out whether or not the return from Find is an actual object. Next, check the position of that object (via another print) - it's possible that you could have duplicates at Vector3.zero that you didn't know about
(comments are locked)
|
|
Is it possible that the item you are instantiating has animation attached to it. If so, try turning the animation off.
(comments are locked)
|
|
Edit: removed the script from here and put it into the question
(comments are locked)
|
|
That is also my guess. Your code GameObject.Find("Spawner1") doesnt return a valid game object and thus the Instantiate falls back to spawning your object at 0,0,0 @Thomas, no offense, but your reply is basically the same as @Mike's (as your first line says). It doesn't really warrant a new Answer - if you had any minor updates, it should go as a comment to another Answer.
Jun 21 '10 at 02:20 PM
Cyclops
Ah - none taken. Need to getting used to answering more stuff here "the right way"
Jun 24 '10 at 11:25 AM
Thomas Hentschel Lund
(comments are locked)
|

Without seeing more code it's going to be hard to help you.