- Home /
Transform component does not line up with model
Hello. I have been adding objects to my scene that I created in Google SketchUp. One of the problems that I have been noticing though is that the transform handles on the object do not line up correctly with the model. In the image below you will see a desk that I imported, but the transform controls are on the floor. I want them to be in the center of the object(like the ones I drew).
Is it possible to change this?
Thanks,
dylan92
EDIT: Here is a screenshot of my model in SketchUp.
Answer by hathol · May 16, 2012 at 03:07 PM
You could create an empty GameObject and attach your model as a child to it. Then use the parent object to move it around. Scripts should be attached to the parent object of course. That way, you can basically move your pivot point around freely (by moving the model object). I'd usually recommend using that method anyway since it keeps the graphical representation separate from the logic and makes changes easier.
Answer by Piflik · May 16, 2012 at 02:52 PM
I don't know Sketchup, so I don't know if you can even do something about that, but the wire of the table are crap...vertices that don't add to the silhouette don't belong into a realtime application like a game. The polycount is quite low, so the impact is not too bad, but just for future reference...
To get to your problem: You'd have to adjust the pivot of the object before you export it from Sketchup. I don't think Unity can edit that.
The object is positioned at the origin in SketchUp, but the transform handle in Unity seems to placed randomly. I'll update my original post with a screenshot from SketchUp.