- Home /
Moving arrows far away from object
Hi, when I drag a prefab into the scene, it places it, but in order to move the object, I need to find the moving arrows, which are really far away from the object. Moving these arrows like normal moves the object on a larger scale than I need. When I double-click on the object in the Hierarchy window, it takes me really far to the left of the object to the arrows. The prefab wasn't made by me, but it is pretty much a modified version of the FPS. Any ideas what went wrong and how to fix this? Thanks in advance.
What is the hierarchy of the object? Could you link it here? I could take a quick look at in!
It's just located on the highest level, not inside a GamObject or anything. Here is an image of how far away it focuses. Do you need any more information? =)
The image is broken =(
If you just put the prefab in dropbox or give me the link where you DL it, I can take a peek =P
I know what the issue is, but I won't be able to say whats causing it without more info =(
https://www.dropbox.com/s/owevbpa1i2ylr3h/Screenshot%202014-03-18%2020.00.41.png
Sorry if it's a bit fuzzy =P
Answer by supernat · Mar 19, 2014 at 05:56 AM
Selecting Center for your origin point is a clue to the problem. Center puts the arrows in the geometric center, I.e. Center of everything drawn. However, selecting Local shows where the local origin or model origin is defined. Your arrows being way out in the middle of nowhere means the children of the game object are all located way off the center of the game object. There's a relatively simple fix. Get the thing lined up right in the center of the editor, then drag the children all outside of the main game object, so they are at the root of the hierarchy. Now select the main game object, the one you pulled from prefabs, and set it's transform x, y, z to 0. Now drag the children back into the GameObject, and hit apply to update the prefab.
Alternatively, you could just set the child's transform x, y, z to 0 if you only have 1 child. This is a bit riskier with multiple children, as there might be some offsets between each child.
Your answer
Follow this Question
Related Questions
Move to a position on buttonhold? 1 Answer
My character isn't moving 0 Answers
Move objects with mouse while paused (2D) 1 Answer
C# trying to move a object 2 Answers
Object moving to mouse 0 Answers