Toyful Games

Toyful Games

We make games packed full of expressive, exciting toys
Buy Very Very Valet NOW - toyful.games/vvv-buy​
Available on Nintendo Switch, PS5, Steam, and Epic Games Store!

~ More from Toyful Games ~
* See more Very Very Valet at our website - toyful.games​
* Stay up to date with the Toyful Blog - toyful.games/blog​
* Buy here - toyful.games/vvv-buy​
* Download the FREE Nintendo Switch demo today - toyful.games/vvv-di​

#VeryVeryValet​ #NintendoSwitch #MadeWithUnity #PS5 #Steam #epicgamesstore #PC #Windows #Mac

Greetings From "Up and Down"

Greetings From "Up and Down"

Greetings from "Bowled Over"

Greetings from "Bowled Over"

Пікірлер

  • @AKExtra-wr6uy
    @AKExtra-wr6uy11 күн бұрын

    Can we use this code in any project without any fear of copyright

  • @FrosthPlaysBR
    @FrosthPlaysBR11 күн бұрын

    Unbelievable

  • @yboumaiza7
    @yboumaiza713 күн бұрын

    Although, the video is great, the code doesn't mention the sideways friction curves implementation you talked about at 17:50

  • @howandwhythingswork
    @howandwhythingswork15 күн бұрын

    I was watching the suspension part, so even if we put infinity weight on the car, the suspension is bound to come to rest distance eventually?

  • @TheRealAli_Real
    @TheRealAli_Real18 күн бұрын

    Maybe you guys Ineed Update like Freedom and Multiplayer hangout maybe something like that

  • @spacewizards9039
    @spacewizards903919 күн бұрын

    Wow, very impressed. The game I'm working on uses (mostly) hover vehicles, so I was already using a setup similar to yours (floating "characters" with continually calculated strength and dampening forces). But you guys have really taken it to the next level with improvements that I hadn't thought of at all. Thanks!

  • @batuhanyldrm7532
    @batuhanyldrm753226 күн бұрын

    Just checking for Rigidbody tutorials and I saw your video. While I was watching, I was wondering what game was playing in the background. Then I found out about this gem, LOL. Definitely will try. Perfect tutorial and perfect advertisement. Good job, by the way.

  • @nuin9937
    @nuin9937Ай бұрын

    What is speedFactor at 4:02?

  • @colonthree
    @colonthreeАй бұрын

    A lot of this reminds me of testing out springs in Verlet integrations and Kabsch. ;w;

  • @bovineox1111
    @bovineox1111Ай бұрын

    This is a great solution. Love it.

  • @ruka1973
    @ruka1973Ай бұрын

    You could become the new "brackeys". You really have a great talent for tutorials

  • @kerduslegend2644
    @kerduslegend2644Ай бұрын

    man, this is such a hidden gem. i dont know why i dont know your channel earlier

  • @shukarullahshah
    @shukarullahshahАй бұрын

    Hey please make more tutorials!

  • @ezequielcanale
    @ezequielcanaleАй бұрын

    It might happen to you that if you steer the wheels right and left really quickly, your car starts flying in the air. I will show how to solve it. I'm not sure why it happens, but it is related to the imprecision of simulated physics, maybe the grip force glitches and pushes the car more that it should or something. To solve it, you want to make it so the input (controller joystick probably) doesn't directly translate to the wheel steering but instead move to that direction for the previous one. To do this, you should use the lerp function, you can look it up in the Unity Documentation. Here it is how I solved it: Vector2 steeringInputValue = steeringInputAction.ReadValue<Vector2>(); float targetSteeringValue = steeringInputValue.x; //this is the value of the joystick, you may be getting it differently currentSteeringValue = Mathf.Lerp(currentSteeringValue, targetSteeringValue, 5 * Time.deltaTime); Vector3 previousRotation = wheelTransform.eulerAngles; wheelTransform.eulerAngles = new Vector3(previousRotation.x, transform.eulerAngles.y + currentSteeringValue * 45, previousRotation.z); Bye

  • @aaronh560
    @aaronh5602 ай бұрын

    This is brilliant. I'm currently fighting with wheel colliders to get the exact semi-realistic arcade-like feel that I want - with predictable controls to be able to increase stats over time without the physics of the car going haywire and it's driving me potty

  • @lucapagano3685
    @lucapagano36852 ай бұрын

    How you make a lookup curve?

  • @Firebugs_
    @Firebugs_Ай бұрын

    You can use Unity's AnimationCurve class and call the Evaluate() function

  • @Phyksar
    @Phyksar2 ай бұрын

    It would be great to hear what exactly do you use as the tireMass parameter at 17:58 for computing steering force, because this can affect whether the wheel is capable of producing the force that results in a greater opposite velocity than the one from the previous frame and make the simulation unstable.

  • @josephan6953
    @josephan69532 ай бұрын

    Would this be three separate scripts we’d have to attach to the just the body of the car?

  • @bubski3821
    @bubski38212 ай бұрын

    this is one of the smartest custom controllers I've ever seen, so impressed with yall's work on this

  • @nurdi21
    @nurdi212 ай бұрын

    Great tutorial!

  • @chilenitonuma
    @chilenitonuma2 ай бұрын

    Thank you so much for the content! I have a question. I've coded out everything as described in the video, but my rigid body ends up tilting to one side, and despite being a perfectly balanced body with equal forces on each corner, it can't right itself. To make things worse, the "suspension" force ends up acting as a forward propulsion force because the tilt gives it enough of a non-vertical direction to propel it forward, despite having 100% grip all around. Do you have any recommendations for this?

  • @Firebugs_
    @Firebugs_Ай бұрын

    I'm having the same issue with tilting. Did you work it out in the end?

  • @MYNKS18
    @MYNKS183 ай бұрын

    We need more people like you on youtube! You video looks like a AAA budget NatGeo Documentary! Love you! I would like to pay for this type of content rather than college degree or bootcamp🔥💪♥️🤩💥

  • @bazzel1059
    @bazzel10593 ай бұрын

    How would I add a maxOffset to my suspension?

  • @supercables251
    @supercables2513 ай бұрын

    +1 sub for being the only correct character controller I've ever seen talked about.

  • @guraaagawrrr250
    @guraaagawrrr2503 ай бұрын

    I am confused about the two grip factor curve in the steer part (the two curve in one same graph). which one is for the front tire and which one is for the rear tire?

  • @shelikhann
    @shelikhann3 ай бұрын

    Очень полезный контент, это то, что было нужно!

  • @yogihermawan1181
    @yogihermawan11813 ай бұрын

    Thank you very much for providing such valuable knowledge for FREE! I learned more from your video than any assets I've paid.

  • @1989hainoki
    @1989hainoki3 ай бұрын

    i tried to re-create this, and kinda got it working, however my cars body rolls the opposite way than it should, it leans into the turn not away, and im not sure why

  • @themaazmaaz
    @themaazmaaz3 ай бұрын

    All this talk of springs reminds me of "Spring Fever", a short riffed in MST3K. "Noooooooooooooo Springs!"

  • @gamedevpaddy3944
    @gamedevpaddy39443 ай бұрын

    Very fun game, i will be playing this soon

  • @christianthedumb
    @christianthedumb3 ай бұрын

    I have one question? For starters this video was awesome and I love every aspect of it but I don’t understand why we calculate Mass * Acceleration for forces as doesn’t the engine calculate velocity and forces it self?

  • @sethsandwich
    @sethsandwich4 ай бұрын

    This was an incredibly good tutorial. Thanks so much for the effort that went into this 🙂

  • @maybe_raj
    @maybe_raj4 ай бұрын

    No Linux support? :(

  • @tasdude3227
    @tasdude32274 ай бұрын

    YOOOOOO THANKS MAN EXACTLY WHAT I WANTED!! THANKS!!!

  • @torryjaja
    @torryjaja4 ай бұрын

    This is absolutely fantastic

  • @shingAMarie
    @shingAMarie4 ай бұрын

    do you, or anybody else have tutorials explaining this for sort of beginners. I still don’t understand the basic code of sending a line trace from the character to the ground to see how far they are from the ground. I need to understand that concept and how it goes into Code. Can you please help with that or refer me

  • @Paum-RSR
    @Paum-RSR4 ай бұрын

    Hey, i just noticed something, you apply the suspension force to the up direction of the tires, so this means that if the vehicle is inclined, it will get a force pushed to the opposite direction of the inclination, even if the terrain is plane. So... wouldn't be better to apply a force direction from the normal of the raycast Hitpoint?

  • @aliashrafi2063
    @aliashrafi20634 ай бұрын

    19:12 Lost it when I saw the eyes :DDDD. Awesome Guide!!

  • @luisfidalgo9128
    @luisfidalgo91284 ай бұрын

    This is content i would pay for! Understanding the physics and how everything works before any line of code is the best way to learn! Amazing video and thank you for taking the time to make it, with all the in depth physics explanation!

  • @PicnicsPete
    @PicnicsPete5 ай бұрын

    This has completely flipped how i'm approuching doing my car physics now. The way you've done the presentation is also amazing, clear, well illustrated and straight to the point. I can't commend you guys enough for this break down and the others you've done. Where can I sign up for your patreon of Unity tips :D

  • @psychedeliccoffee2737
    @psychedeliccoffee27375 ай бұрын

    Please make more of these dev-style videos. They are amazing

  • @Tankmin
    @Tankmin5 ай бұрын

    Hey, I just want to say thank you. This is a very great and concise guide to getting a raycast car set up :) I also appreciate you providing some source code. In my free time, I have been working on a car game as well, but mine involves high speeds and sharp turns and I ran into a lot of unique issues. For instance, I kept having to make my steering angle extremely small at high speeds to avoid the car flipping over, and this isn't the effect I wanted (also I probably still have some bugs left in my code). Here is some more information I would like others to learn and stopped me from endlessly testing magic numbers everywhere: - The base spring constant for your vehicle should be: mass * 9.8 / 4.0 / (half of the total spring length). The 9.8 comes from gravity, since -9.8 is the acceleration of gravity and you want to counteract it. Multiplying that by the total vehicle mass gives you the downward force the car will be applying to the suspension. Dividing that by 4 (number of wheels) means the wheels will equally support the weight of the vehicle. Dividing all that by half the length of the total length of the suspension means that the suspension will be trying to balance itself at half the suspension length. Now that you have all that, just take that value and scale if by some number between 0 and 1 for the desired spring behavior :) - If you want to be able for your car to have a sharper turn at high speeds without turning over, one thing you may want to research what is known as toe in and toe out. Basically, if the distance between the front tires is less than the distance in the back tires, that's toe in. Your steering will be less responsive at high speeds, but the tendency to flip over will be reduced if you turn at a high angle. Toe out is the opposite, the back wheels will be closer together than the front, your steering will become more responsive, and more likely to flip over. I think this is related to understeering and oversteering, I'm still learning though - You can look into ackermann steering or anti-ackerman steering to help you with various turning behaviors

  • @himanshugupta325
    @himanshugupta3254 ай бұрын

    Thank you for the information, recently I was in the same problem of getting desired values for the car.

  • @Tankmin
    @Tankmin4 ай бұрын

    Glad it helped! Today I learned that if you apply the tire friction forces at the center of mass, the car won't like to flip over. That way, at high speeds with sharp turns you won't flip over. I learned that from a Rocket League GDC presentation, and they mentioned that when you do that you lose all your body roll and the car looks boring and stiff. They just added that back in with animations. I tried it and that worked for me! And to add some body roll back in, I just lowered the location of those forces slightly (like by a distance of 0.02) in the direction of the wheels' y basis. That way, you still get the body roll, but it's much less pronounced and the car won't flip over.@@himanshugupta325

  • @Xorked
    @Xorked5 ай бұрын

    These videos should be used in universities, such great visuals and explanations.

  • @Zeddwolff
    @Zeddwolff5 ай бұрын

    I really liked all of the explanation but I'm still confused on how the wheels know where to go relative to the ground with the raycast. If anyone has a code example of this or something to help me understand it more. Having trouble getting started with this.

  • @thebutterappletutorials6553
    @thebutterappletutorials65535 ай бұрын

    Great video/tutorial! One issue I've encountered is the car hates any form of jumps. When trying to go off one it latches into the ground chasing it to get stuck. If anyone has experienced this issue and has any tips I'd be grateful!

  • @elementz301
    @elementz3015 ай бұрын

    Very helpful in figuring out the sideways forces. Now if I set the grip factor to anything but 0, I flip the car if I turn too hard lol

  • @ghostpeppered4524
    @ghostpeppered45245 ай бұрын

    @4:25 How can we draw awesome arrows like shown here? Gizmos.DrawLine() works, but is not nearly as nice. Is it LineRenderer? Is it a cylinder mesh? Is it GL.LINES? Is it a Unity Asset Store plugin like ALINE? Please share any hint. :)

  • @OddStare
    @OddStare5 ай бұрын

    I love the simplicity of it, thanks for sharing this with such quality ! Less rigidbodies is always a win in my book

  • @user-xp2kf6ut2d
    @user-xp2kf6ut2d6 ай бұрын

    How to get spring RestDistance?

  • @Ironlionm4n
    @Ironlionm4n6 ай бұрын

    Can anyone proved me with some learning materials or resources to put me in the right direction for learning these concepts?