x


Making a realistic tire/wheel?

This might be kind of tricky to explain but I'll try my best.

My character is basically just a wheel, a single wheel (looks like a car tire actually) that is always standing up. I want him to do the usual when movement keys are pressed; go forward, backward, left and right etc. But I want his movements to mimic those of a wheel as if it was rolling around in different directions.

The physics of this are kind of hard to nail down and so far nothing I've done has really looked right. I kind of want him to sort of "tilt" to one side when turning, when backing up I want the wheel to just go in reverse instead of just immediately turning around, and some way to keep it from falling over when ever sharp turns are made. You know how wheels behave I'm sure.

Can anyone point me in the right direction to something that might help me get off the ground with controls like these?

Thanks a lot.

more ▼

asked Feb 02 '11 at 07:25 PM

Jack gravatar image

Jack
10 7 8 9

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Well, we have a lot of questions here :)

Things that can help you:

Physics materials
This can help you if you are using rigidbodies. The Physics materials determines the friction and bouncing of your object.

Freeze rotation
This will freeze the rotation of your rigidbody, this way, your wheel will not fall aside.

Math
I don't see another way than this to rotation (rolling) the wheel: calculates the velocity and diameter of your object to determines the rolling rotation. This way, you will need just to apply a force to your object. I guess the racing tutorial uses this calculation.

more ▼

answered Feb 02 '11 at 07:59 PM

Borgo gravatar image

Borgo
998 9 13 25

Thanks a lot! That will help, didn't know about freeze rotation.

Feb 03 '11 at 08:51 PM Jack
(comments are locked)
10|3000 characters needed characters left

Have you tried working with wheel colliders? They may help somewhat. You'll have to play around with them a lot to get it to work, but at least you don't have to script the physics yourself - that can get a bit hairy.

more ▼

answered Feb 02 '11 at 08:03 PM

e.bonneville gravatar image

e.bonneville
5.7k 100 117 165

Man, I'm so dumb. Wheel colliders, of course. Thanks for pointing those out to me, I never really noticed it before.

Feb 03 '11 at 08:52 PM Jack
(comments are locked)
10|3000 characters needed characters left
Your answer
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:

x1948
x63
x28
x24
x7

asked: Feb 02 '11 at 07:25 PM

Seen: 1530 times

Last Updated: Feb 02 '11 at 07:25 PM