Hello,
I’m trying to get a script called JCar to work, but I’m having trouble importing the graphics correctly.
I have tried to import car body and wheel graphics separately or together, but I’m not quite getting the structure as the JCar example (hummer) has in the project.
In the example the car body mesh is a parent to the wheels (in Unity project). I don’t even know if this matters, but importing the pieces separately (body and wheel) does not seem to work either, even if I try to make an identical game object. Should the meshes be parented in the modeling app somehow before importing or not?
I can get the car (body) moving, but the wheelcolliders don’t really match up. With trial-and-error I have created a few “interesting” effects of wheels revoling around the wrong axis etc
If you’ve got experience with this script, any tips would be appreciated
Duh,
Almost got this working. At least I think I know now, where the problem is:
When I press the pivot button in Unity, I see that the pivot of my car wheels is not at the wheel center, but at the center of the car body.
Is there a way to move the pivot in Unity? I tried to reset all transformations and the pivot in XSI, but no luck - any tips still appreciated
you could make a empty game object and position it where you want the pivot point.
Then make the wheel a child of the empty object.
Then just control the empty objects …
Big Thanks,
That worked
Would be nice to know though, if this could be fixed already in the modeling package. Anyways, works great with the game objects (although the car veers quite a bit on the side, but I guess this is not a pivot issue anymore, not the same anyway).
Ok, nice to se that it worked for you
Yeah,
in fact I also just fixed the veering problem: Turned out that the offset of the wheels was not exactly equal from the car center.
Dang,
I was a bit early about the veering problem
Could someone help me out here? What’s the key factor causing the veering?
My car is made of several meshes (possible problem, pivot?) and it has gameobjects for the wheels as adviced by spmedia. Otherwise it works great but the car is still veering off course.
I can “cheat” by making it all-wheel-drive and then it almost goes straight (but still not straight enough), but it would be really nice to get it working as it’s supposed to (front wheel drive).
SOLVED
I got this working without game objects now and the veering got eliminated as well
The solution was to make sure the pivots are in the right place (center of wheel) in the modeling app, before coming to Unity.