Wrong Origin when transforming objects

Hi everyone :smile:

I’m trying to have all my objects at 0.y (floor level), but whenever I create an object and scale it, this origin seems to change. For example I have a cube to the desired size at 0.y floor level, but when I create another cube and resize it, it is obviously not at the same level even though the inspector says it is at 0.y

Any help? Thanks in advance.

I’m not quite sure what’s happening on your side (video would help ;). But can it be that you’re having some problems with center vs. pivot of tool handle?

Thanks for the reply. I’m fairly new to mac so I did m best to get a screenshot.
I’m not sure what the tool handle is. I created these blocks in unity, if that helps any. Thanks mate.

The transform position is calculated from the pivot point of the object so what you’re seeing there is correct.

Following up on what aNTeNNa trEE wrote, the bottom of your imported cubes is not at y=0. The middle of your cubes (the pivot point) is at y=0, and the bottom is lower than that. So when you scale the cube larger, the middle stays at the same position (y=0), the top rises, and the bottom lowers. That’s why it appears that the cube is lowering, although it’s really just “growing” in all directions.

The solution would be to recreate your cube so that the bottom is the pivot point, rather than the middle. (I don’t know the specifics of accomplishing this.)

Thanks guys. like in 3D modeling, I figured that would be the problem, but I was just really confused. I guess the next question would be how do I change the pivot point of objects, but I can probably find that with a little searching. Thanks guys.

sorry to double post. I think I found my answer here:
http://solvethesystem.wordpress.com/2010/01/15/solving-the-pivot-problem-in-unity/#comment-19

However I’m having a little difficulty setting this up in the editor. Has anyone gotten this script to work? Any help?