tyre Set-up

Hi to all,

Do you know how to set up the tyres of the car in Maya? I mean, I need that the tyres turn when the car is moving and then, when the car stops, the tyres stop they turn.

Have I to make the tyres apart? in a separate file an then, attach to the main model?

Can I made the entire car within Maya and use it insite Unity with that feature?

Thank you in advance

I think you mean tires? :wink:

You should be able to just make them a seprate object in the same scene. I think that a lot of games dont actually rotate the tire, but instead they put a ainimated texture on the tire and controll the speed of the animation. Then you use ray casts instead of rigid bodys for the tire physics.

Btw, does maya support animated textures? …haven’t tried.

Bill

Hi Sync1b,

Yeah tires, sorry for that. :sweat_smile:

Maya supports animated textures (I think) but I don’t know what is “ray casts”. can you explain me?

thank you in advance

Heh, no prob. My spelling is usually less then par. :smile:

A ray cast is just a line that is casted from one point to any direction. You can check out rays here. You use ray casts for a lot of things, but in your case I think you would cast a ray down from each wheel origin and based on the distance place the car at the appropriate height from the ground. Check out RaycastHit for all the things that can be done with rays.

Hope that helps.

Bill

Actually ignore that first link this is what you want.

Bill

“Tyre” is the UK spelling of the American word “tire.” Alternatively, “tire” is the American spelling of the English word “tyre.” :wink:

Oh really? wow… had no idea. Sorry then joacoerazo. :smile:

Bill

Hi syncb1 and tsphillips,

Thank you for the info, is very helpfull for a non English speaker this tips.

About the topic, if I use the the animated texture, it will hide my low poly mesh as if I use a rotating object?

Thank you in advance.

would it not be better on performance to just have the tire object rotate with a script? Because an animated texture is going to take up more VRAM?

No worries on not being a native english speaker, I am and non-native english speakers correct me left and right.

Uh, yeah actualy your probably right jeff. I have just had animated textures on the brain lately :stuck_out_tongue:

Bill

Hi Outcast,

Thanks for the ad, how the script looks like? There is a sample script in unity? or a prefab?

Thank you in advance

Yoggy could aid us here :stuck_out_tongue:

Yoggy is straight up using physics on his car… The rotation on the wheels “is” the movement.

I think a RayCast solution with another script that rotates the wheels accordingly is the answer. Animated textures on the tire is crazy right now with Unity (until they integrate some QT compression).

So just have the rotate script like yoggy but make sure the tire has no colider and then do the ray casting to position the vehicle? Jeff

Yoggy has a bunch of primitive Rigidbody Colliders (boxes) around his wheels and he’s using that friction to move his car. It works great for his “all terrain” approach. Nicholas said at some point that most driving games use Raycasting to determine where the car is situated on the ground.

So maybe setting up a script that rotates the wheels in relation to the speed of the car would look realistic.

Yeah, I think thats the way to go. You should remember to use physics on cars body dont place the car exactly x above the ground. Just have a minimum distance (being the diameter of the tire) that the car can be off the ground. Rotate the wheel like antenna said, and you off to making a sweet car. Should handle well too. Cant wait to see

Bill

Thank you guys,

Iĺl try all your sugestions as fast as I can.
If you have any idea how these script look like let me know.