Prefab jitters when dragging into scene

My son and I have tried following this course and both had the same problem on two separate machines, in both 2020.3.48f1 and 2022.3.4f1.
When we create our prefab and try to drag it into the scene, it jitters in the Y axis, up and down, and ends up being placed at whatever Y level it was at when you let go. Switching from Center to Pivot mode gets rid of this problem, but we don’t know what that means.

What are we doing wrong?

I don’t think you are doing anything wrong, really. Unity tries some internal magic to determine where you are trying to put the prefab. When you use Center mode, all the game objects in the prefab are used to determine where the center of the prefab is. I think it jitters because Unity is also using each of these game objects’ pivots in finding whatever it is you are trying to put somewhere. When you switch to Pivot mode, it uses the root game object’s pivot and there is no confusion as to which object to place. I believe - and I think I heard this in one of the courses too - that it is best to always use pivot mode, and only use Center in very specific cases.

There are other options;
Drag the prefab into the hierarchy instead of the scene. This will place it at some weird arbitrary position that is determined by the camera and some chemical x, etc. Then you can move it to wherever you want after it’s in the scene. You can also change a setting in your preferences to always place it at the world origin (0,0,0) when you drag it into the hierarchy.

1 Like

Thank you for responding! I figured it’s something basic that we just don’t get yet.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms