Main Assembly – Drifting Guide

This short guide will explain how to make functional drift cars in Main Assembly.

Guide to Drifting

Disclaimers

Due to the way Main Assembly physics works, the drift setup introduced in this guide would turn any car of interest into Gymkhana cars which are very slippery (almost too slippery). If you prefer a more realistic handling, some extra programming may be needed.

Part 1: Lose Grip

Although Main Assembly have really bad wheel physics, the tires on the wheels are actually very grippy. This means any attempts of side sliding would be quickly killed off even if starting the slide can be as easy as locking the rear wheel with brake. Therefore, to maintain the side-way speed during drifting, some extra steps must be taken.

Prepare the wheels

As explained in the car tuning 101 guide (please read if you haven’t). The wheels would gain extra grip when being directly attached to a engine part that combines suspension and steering. To remove that extra grip, attach a chassis to the engine, then attach the wheels to the chassis. This would allow the wheels to spin easier. This method would also allow the wheel spacing to be adjusted which can be beneficial for some builds.

Spin the wheels

To drift and maintain drift, spinning the wheel as fast as possible is necessary. Therefore, the car must be big enough to house the large engines and be as light as possible. For a more realistic way of spinning the wheel, stack multiple engines and weld them all to the chassis the wheel is connected to would greatly increase the power and therefore the likelihood of making the wheel spin at the desired speed. Using brake bug introduced in the “Car Tuning 101 Guide” would also provide the same effect.

However, the drawback of this method is that the wheel choice would become limited. If the wheel of choice have increased grip on the desired surface, the wheel would not spin and catch the road. Therefore, the wheel should only have at most average grip on the desired drive surface when using engine stack trick and brake bug.

So if for some reason (mostly aesthetics) high grip wheels are chosen, the only way to keep the car sideways through the corner is the RCS thrusters. By assigning a positive anti-gravity value to the car, the car would become “lighter” which makes spinning wheels a lot easier. The exact value of anti-gravity and the exact number of RCS thrusters mounted would vary based on the weight of the car and the desired handling of the vehicle. But it is always beneficial to mount the RCS thrusters near the wheels to allow for more possibilities for RCS thrusters programming. Personally, I would mount the RCS thrusters directly on the plate the engine part is sitting on.

However, with the grip reduced, the turning, acceleration and braking of the vehicle would suffer. To remedy the issue, simply bind the throttle to the forward/back of RCS thruster, turning to yaw and brake to anti-velocity. For my personal preference, I usually skip the RCS brake since the brake in Main Assembly is pretty strong even with reduced grip.

Due to the inconsistency of the wheel grip in Main Assembly, the RCS method is usually my preferred way to get the wheels to spin properly.

Drift Tuning

A drift car would not be good without proper tuning. To start the tuning, first get a drifting started at a flat part of map (Norrland sliding circle is perfect for this), then observe how the car behave when there is no steering input. If the car tends to correct itself during drift, lower the speed: power ratio of the front engine to reduce front wheel torque and increase the speed: power ratio of the rear engine for more torque. If the car tends to spin-out, increase the front wheel torque and reduce rear wheel torque. If the RCS thrusters are used and they are mounted in the way I had introduced, decrease the front anti-gravity would make the car spin-out more and decrease the rear anti-gravity would make the car correct itself more. Ideally, the car should hold its drift (neither correcting nor spinning out) when there is no steering input. If the car has too little grip, decrease the anti-gravity value and vice versa.

Part 2: Drifting Aesthetics (AKA Tire Smoke)

Drifting is an art. One important part of this art is the tire smoke. However, since Main Assembly has very subtle tire smoke, we have to make our own with the trail makers and speedometer.

The location the smoke would come out is the wheel well. This means the perfect location for the trail makers would be the exact plate the engine is mounted to and facing outwards. In this way, when the smoke comes out of the trail maker, it would look like the tire smoke.

For real cars, most tire smoke would come out in two main situations:

  1. When the tire is spinning due to extensive power,
  2. When the wheel was locked due to extensive braking.

Both situations are the result of the difference between the real speed of the car and the wheel speed. To get the wheel speed, simply multiply the rotation speed of the engine by pi (3.1416) and the diameter of the wheel in meters. Then take the absolute value of the difference between wheel speed and the real speed of the car and feed it through a step function. By setting the step threshold, the amount of wheel spin required to produce tire smoke can be fine tuned. Since not all four tires are spinning and producing smoke for real cars, it is recommended to run this calculation for front engines and rear engines separately.

Part 3: Miscellaneous

This part is for some features that can be incorporated into the car for a better driving experience.

Drift angle

Although seemingly useless, this data is very cool when it appears on the HUD. To calculate drift angle, simply divide the rightward speed from speedometer by the speed. Then feed the result to a arcsin function. After that, convert the value from radians to degrees by dividing the value by pi(3.1416) and multiply the result by 180. The resulting angle would be in degrees which can be fed into a debug node and show up on the HUD.

Camera Turning

If you like to drive in first person, this part will be helpful. Having the camera rotates towards the direction the car is going would greatly improve the drifting experience. To do that, simply attach the view camera to a servo and use the drift angle in radians (or the ratio of rightward speed and speed) as input to adjust direction the camera is looking at. The range of motion of the servo and the scaling of the input may also need to be adjusted to get the best out of this function.

Conclusion

This guide is not the end all be all guide for drifting in Main Assembly. The purpose of this guide is to inspire more players to try making drift cars and find new building techniques that can contribute to the community. I hope you all enjoy the process of making a good drift car and have fun drifting. I am hoping to see more drift maps and perhaps do some tandem drift with players online.

Recommended for You

Be the first to comment

Leave a Reply

Your email address will not be published.


*