The question is answered, right answer was accepted
Help! Why are all transform.position of parts of my model 0,0,0 ?!
Hi again. My question is why do all parts of my model have a transform position of 0,0,0 when they are clearly not in the same place. For example I have a gameobject car which has 4 children (wheel FR, wheel FL, Wheel RR, Wheel RL). How can the front left wheel have a position of 0,0,0 and the front right wheel still be at 0,0,0 if they're not in the same place. This is really troubling me since the car script I'm using needs each wheel to have different positions for animating the wheel or else my car does the doggy paddle while driving. To show you what I mean I will compare one of my car models (Ferrari 458 Italia) to one of T-Bull's car models (Mazda Speed 3).
As you can see on my car the front right wheel has a position of 0,0,0 while the front right wheel on T-Bull's car has its own transform position. I keep trying to compare our cars but I can't seem to figure it out since as far as I can see we both exported the wheels and the car in one model. To compensate for this I have been exporting my wheels separately but I don't want to keep doing this. Please tell me how to make each part of my model have unique transform positions. It would really help a lot. Also does it help if I tell you my custom models are made with SketchUp and MODO 801. Thanks.
Answer by dval · Jan 10, 2016 at 04:58 PM
How is your prefab built? If it has an an empty parent, when you select mesh renderer in scene, it would be at zero origin, relative to the empty parent.
Do you get the same origin when you select the wheel from the hierarchy?
Um.. Yes but whenever I select any other wheel thier transform position is also 0, 0, 0. Whats wrong?
$$anonymous$$ost likely it has to do with how the objects are getting exported from SketchUp in the first place. The $$anonymous$$esh is offset from the Orientation or Piovot Point. This could be because the entire model was exported as a group, or because sketchup can only export items at (0,0,0).
Then, the answer would be, as you said, to just export everything individually. $$anonymous$$ost likely your options are to find a script that will reset items before export, or experiment with grouping in your 3D model before exporting.
This post has a good work around for fixing this in unity. It would make it easy to update prefabs, if you attach the wheel to a parent object in Unity.
Answer by kilogold · Jan 10, 2016 at 04:09 PM
This sounds like a problem of local vs world coordinates. Have you checked where the origin is for the meshes you are troubleshooting?
<0,0,0> is the origin... If it's not at the world's origin, it is at the object's local origin.
How do I check the origin? Also can I change the origin of the wheels to themselves? I really don't understand since the wheels are all direct children of the car, so how can they have the same local position?
Follow this Question
Related Questions
Share unity project with Autocad Plant 3D 0 Answers
Is it free to use minecraft skin in my game? 0 Answers
3d animation breaking 0 Answers
How to move spine objects 0 Answers
Wrong materials ID 0 Answers