x


Spin wheels to move vehicle

I am just getting started with Unity and I'd like to ask a question. If I have a "Vehicle" object that has two children: "FrontWheel" and "BackWheel" (both 'wheels' are cylinders), how should I set everything up such that I can move the entire vehicle by turning its wheels?

When I apply a torque to "FrontWheel", the vehicle starts to move, but instead of the whole thing the moving together, the chassis is rolling on the cylinders and eventually falls off.

How can I prevent it from doing that?

Edit: Here's the Unity project: http://www.filedropper.com/childmovesparent

more ▼

asked Jun 19 '12 at 07:12 PM

paulcmnt gravatar image

paulcmnt
37 3 6 9

generally you (surprisingly) only "rotate" the "images of" the wheels, based on how the, err, abstract wheel is moving along on the ground.

it's really a big effort setting up a vehicle rig. Did you know there are a couple of car, bike, kist in the Asset store.

to get specific help here you'd probably have to post your set-up

Jun 19 '12 at 07:32 PM Fattie

@Fattie I added a download link to the Unity project.

Jun 19 '12 at 07:39 PM paulcmnt
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1881
x184
x101

asked: Jun 19 '12 at 07:12 PM

Seen: 405 times

Last Updated: Jun 19 '12 at 07:39 PM