Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Prefabs

UnityUnity Member
edited May 2020 in Programming

Whenever I drag a prefab into my scene it will place it halfway in the ground. If anyone could help me fix it that would be great. Thanks in advance.

Best Answers

  • UnityUnity Member
    edited June 2020 Accepted Answer

    The fix for this for me was that I have the Handle Position on pivot, when I switched it to center it fixed my problem, sorry for not explaining my problem thoroughly.

    The problem was that when ever I would drag a prefab out from the project panel it would be placed halfway inside and halfway out of the ground instead of on the ground so that when ever I played the game it would pop out of the ground since it was a rigidbody.

  • WarpWarp Administrator
    edited May 2020 Accepted Answer

    Poster did not elaborate, so for anyone wondering:

    Unity instances prefabs at the objects origin, so for any primitives (built in Unity shapes), that is in the middle, which spawns them halfway in, halfway out.

    1. If you have access to the object in Blender, move the origin to the bottom.
    2. Move the object up (obviously)
    3. When you instance it, offset it by the amount you need.

    Just some ways to fix it.

Sign In or Register to comment.