hi everyone in the last video we talked
a little bit about things like
acceleration and top speed in this video
I want to focus more on the actual
handling of the car so things like
steering and forward and lateral
friction and stomach on one thing I did
was I actually added these walls here
the reason for this is that I find that
when you're when you're tuning things
like handling it's a lot easier to get a
good feel for it if you actually have
some frame of reference so just adding a
few of these walls can can be useful and
another thing I want to point out is
that this is kind of the more subtle
area of tuning so a lot of this you'll
really have to just play around with
yourself so you can get a feel for it or
I'll exaggerate the values just so that
you can see the effect but it's really
this is one of these things that
designers spend hours on trying to get
just right so just keep that much the
first thing that I want to point out is
you might notice if you if you hold the
acceleration button so I'm just
accelerating the whole time and then I
start turning the left and then I I let
go but I keep accelerating the car
totally steers out of control and the
reason for this is that I'm actually
using an all-wheel drive car so if you
go to your car set up and you look up
differential you'll see that we're using
limited-slip before wheel drive there's
a lot of different advantages and
disadvantages to all of these I'm not
really going to get into it but the
reason why it's it's looking like that
is that as you're turning you're
accelerating and you're actually getting
power from the front and the back so for
the sake of this tutorial just to keep
it a bit simpler and we use frame wheel
drive which has a more simple and like
predictable handling so now you'll see
if I start again
so I'm accelerating all the time I start
turning left
I now keep going forward because the
power is only going to the front so this
isn't necessarily better or worse it
just depends what can
going for it okay so the first thing I
want to talk about is the wheels so you
might remember in the last video or the
first video we added these back and
front wheels we didn't really talk about
any of these settings for now I just
want to talk about the tire settings so
you see there's this lateral stiffness
to failure and all these really do is
they just determine how much forward and
lateral force we're gonna apply in the
car based on the amount of friction
that's acting on the tires so we'll
start with a long slip because it's sort
of the easiest to understand so if I
change it to something like 3000 and
it's important to usually when you're
trying stuff out you want changing on
both the front end attack so we'll
change both of these to 3000 and you'll
see that if I'm going forward now
there's this graph here for tire long
slip so this is actually the value that
we're gonna be multiplying by 3,000 so
there isn't really any mystery to it
it's just three thousand is a bigger
number so you're gonna accelerate faster
and have a slightly higher top speed
because you're applying a bigger force
on the car so I'm actually gonna change
it back to a thousand because I I like
that better but I want to show to you
with the lateral slip so this is kind of
hard to see so I'm gonna make it very
saturated so I'm gonna set the lateral
slip to a very small value of one so now
what's gonna happen is if I actually
start the car you'll see that it's
sliding all over the place and this
makes sense because as the car is
drifting to the side there's lateral
friction but I am NOT applying a very
big force for that so obviously like you
wouldn't want to unless you're in some
kind of very special game you wouldn't
want this sort of behavior but it shows
you how you can play with the different
values another thing that's kind of
interesting is you can get quill effects
by having different values for the front
the back so for example if I set the
back to be 17 in front to be one what's
gonna happen is the car the back of the
car is gonna have more say than the
front car so you can see that as I
stop turning back of the car kind of
Yanks the front back to the way that
wants to go and this makes sense because
the front of the car has very little
force applying from lateral friction so
depending on what kind of effects you
want you can get lots lots of different
stuff I just by playing around these
yeah another thing that I want to talk
about is the ability to control rotation
by using the the inertia tensor of the
car so if we set this back to two being
one the car rotates very easily and
slides around but you can actually
change this so if you go to the car and
you search for inertia you have this
thing called an inertia tensor scale and
all this really does is it just
describes how hard it is to rotate the
car along a certain axis so if we look
at the z axis which is the up Vector and
you set it to some 205 means it's gonna
be very hard to rotate the car so now
you can see that the car is not really
rotating but it's still sliding around
laterally quite a bit and this makes
sense because we still don't have a lot
of lateral forces but the inertia is the
moment of inertia is much higher so
that's just another another way that you
can get different types of effects
another thing to to look at let me just
change this back to something sane so if
I go back to this
and I look for steering curve so the way
the steering curve works is if we look
at the front wheel there is a steer
angle of 70 but when you're driving a
car as it gets faster it actually gets
harder and harder to steer the fullmetal
so the steering curve lets you simulate
this so its speed versus how much you
can steer so at zero speed we can do
full 1 x 70 so you get 70 steering at
something like you know 20 kilometers an
hour
you only get 90 percent at 120 you only
gets any percent so I'll just make this
very exaggerated so if I set this to 10
and zero then once I hit 10 kilometers
an hour I'm not going to be able to just
steer it also now I go back in here you
can see that I actually maybe that's a
little it's a little too extreme so
let's make this like 30 and 0 so now if
I start you can see that I can still
turn but once I get going a little bit
faster now it doesn't matter what I do I
can't can't shrink so this is just
another thing you can use to tweak the
difficulty of turning yeah one one last
thing I want to look at is the slightly
more advanced feature is the lateral
stiffness look so the way this works is
when you're when you're turning there's
actually a different way that the
lateral forces are gonna be applied so
if the car is moving very very fast at
some point it will have a very hard time
applying lateral forces so that's what
this value does so if I actually make
this smaller it means that once I start
going fast enough the car will have a
harder time providing lateral forces now
this might sound similar to the steering
curve but it's actually different in
that you know I could still turn the
wheel and steer like full 70 degrees to
the right but the amount of force that
I'm gonna get
different so this is kind of hard to to
actually illustrate but let's make
something very obvious so if I do like
0.5 and 4/5 I'm actually not sure this
will be very clear so you can see that
at slow speeds
I can move just fine but if I start
going fast enough I have more lateral
force this is something that you'll
probably want to play around with a
little bit more it's it's a bit hard to
convey and if you actually are
interested you can look in the physics
documentation PhysX documentation they
actually have a whole explanation how
these two values working at it so that's
it for for handling of cars in the next
video I'm gonna talk a little bit about
Springs and some more moment of inertia
stuff and that's it so hope I answered
some of your questions
OSU season