Wheel Component

Wheel Component


I welcome you all. Another video, which I would like to share with you the latest update about vehicle physics. I’ve created Pawn class. Called it Test. Just for demonstration. The car we are driving. Suspension work. The vehicle can turn. At first glance, this class is no different from all other vehicle classes I created. But if we look inside this class we will see that there is rather empty. We see – there are no long chains call various functions in which the calculations are made. Everything is quite modest and clean. And here we see there are some new components Scene Components prefix Wheel_Comp that is, the Wheel Component. And if we look in the browser window here really there new blueprint class called Wheel_Comp. We can open it and discover that it somehow just located those missing features. Namely, RayCast, where check a collision using the intersection of the beam; Wheel Accelerating; based on the result of the check RayCast do branching. calculate the force of the suspension; the longitudinal and lateral slip; the combined frictional force of the tire. Apply force to the body. That is, all those missing in the main class function (calculation forces of the suspension and tires) encapsulated inside the component “Wheel”. And appropriately in the main class, in which we have these components we don’t need to worry on these issues. Wheel Components is automatically performed functions entrusted to them. This implies the advantages. First, as has been said, provided by the brevity of the main class. We don’t need to worry on the implementation of the functionality that is already done inside the components. The second advantage is due to the requirement for flexibility to create a vehicle. Ask me in the comments – “would it be possible to create different unique vehicle?” For example a truck or infantry fighting vehicle with 6 or 8 wheels and so on. And reflecting on this problem as if all this is implemented I remembered about the possibility of using scene components class in unreal engine. And of course, life itself tells the solution to these problem. Vehicle it is quite capacious and vague concept, which combines great set, a wide range various technical devices. Which of course all have similar traits. They have the engine, wheels, shafts, differentials, transmissions and so on. But their schemes architecture may differ dramatically, depending on, What is the primary mission entrusted on this particular vehicle type. For example there is a car (4-wheel RWD FWD); there are four-wheel drive SUV; infantry fighting vehicle, which should the mud puddle and to get to places which a regular sedan would never pass. Or is there even any super cars – 20 wheeled monsters which carry ballistic missiles. And it is very good in Unreal Engine 4, we have the opportunity to implement such a flexible system. Due to the presence of Scene Component and creation on their basis of individual vehicle components. each of which will implement a specific task. We only have a problem when you create a unique class vehicle to add to it all the necessary components combining them in a logical circuit; to configure the logic of their interaction, to work properly. In the end, we will be able to create a unique vehicle with any number of wheels drive type, the wheel formula and so on. I now you will quickly show. There is a minimum setup: initializing components of the wheels. And then we find out here function UpdatePhysic or rather, event. and the input parameter – Drive Torque, through which we can transmit torque to the wheel. Depending on the magnitude of the throttle brake input the magnitude of the engine torque, of the transmission type I give some part torque on front and rear axle I shall now demonstrate. Here I include the front-wheel drive (FWD), and the front wheels drive. Now I choose rear wheel drive (RWD), now rear wheel drive. Or all-wheel drive (AWD) all wheel drive. I also can change the amount of torque choose rear-wheel drive, and start doing donuts. As in the class Wheel_Comp implemented the calculation of the combined slip according to the rule of the circle of friction. So we can do quite realistic power slide. And of course sticky friction is also implemented and the car does not slip on the inclined plane. About how to connect and configure this Wheel Component to Pawn class and on minimum setting it up I will do a separate video more detailed. Later I’ll post it on my YouTube channel. At this point I’ll finish. Thank you all for your attention. Please write in the comments how do you like the idea like it or not. Likedislike this video, comment, ask questions, And see you soon in the next video=) Bye!

About the Author: Michael Flood

11 Comments

  1. Вот, давно думал об этом, идея супер без лишних комментариев.

  2. Amazing idea, it's a much more organized way to implement a vehicle system.

    People you got to support this man on patreon, he deserve every penny.

  3. Огонь!!! только если у грузовика два моста а перед не ведущий?

  4. А когда проект будет готов ты скиниш сылку на скачивание или проект будет платный но лутше бы бесплатный

  5. Thanks for the update, really appreciate it. Can't wait for the detail video about vehicle wheel component system, especially 6 wheels infantry fighting vehicle 😉

  6. Иван спасибо за новое обновление, но вы просто ставите проект на patreon или собираетесь сделать учебник по катанию, зажиганию? некоторые вещи, которых у вас нет в учебнике?

  7. Я завис на уроке со звукми двигателя, как я понял вы не использовали стандратные скрипты управления т.е такие как в базовом проекте автомобиля?

  8. Я к примееру создавал базовые классы блюпринта для задних и передних колес, а потом уже их подвязывал + на машину добавлял коллизию чего я здесь не заметил, а не добавишь коллизию она будет просто стоять…или я что-то не так понял?

  9. Помоги пожалуйста, я не понимаю как ускорить свою машину, она медленно разгоняется.(

Leave a Reply

Your email address will not be published. Required fields are marked *