# MassTrafficAI. The wheels on the right side of the car are turning in the wrong direction.

**URL:** <https://forums.unrealengine.com/t/masstrafficai-the-wheels-on-the-right-side-of-the-car-are-turning-in-the-wrong-direction/2120173>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [November 13, 2024, 2:00pm UTC](https://forums.unrealengine.com/t/masstrafficai-the-wheels-on-the-right-side-of-the-car-are-turning-in-the-wrong-direction/2120173 "2024-11-13T14:00:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![boriseviav](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/boriseviav/32/994123_2.png) [@boriseviav](https://forums.unrealengine.com/u/boriseviav)\
**Post date:** [November 13, 2024, 2:00pm UTC](https://forums.unrealengine.com/t/masstrafficai-the-wheels-on-the-right-side-of-the-car-are-turning-in-the-wrong-direction/2120173/1 "2024-11-13T14:00:02Z")

</div>

Hello everyone. I want to create traffic using Mass Traffic AI. I did it according to tutorial → [https://www.youtube.com/watch?v=RRWr\_Hnn5Bg](https://www.youtube.com/watch?v=RRWr_Hnn5Bg)

And everything worked out except the wheels. On the right side of the car the wheels are spinning the wrong way.

Here video with my problem → [UE\_Car\_Traffic - Unreal Editor 2024-11-13 16-04-36.mp4 - Google Drive](https://drive.google.com/file/d/1gTZv5ATsEmssC9tMRe66zNP-yAj0fMGb/view?usp=sharing)

The wheels are connected correctly:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/6/a/26a5ed5cb17a68a4d0e600ca4c0509f0ed1c4e60.png)

Maybe something can be added to the blueprint to invert the direction on individual wheels? Help please!

---

<div class="post-metadata">

**Author:** ![boriseviav](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/boriseviav/32/994123_2.png) [@boriseviav](https://forums.unrealengine.com/u/boriseviav)\
**Post date:** [November 14, 2024, 8:08pm UTC](https://forums.unrealengine.com/t/masstrafficai-the-wheels-on-the-right-side-of-the-car-are-turning-in-the-wrong-direction/2120173/2 "2024-11-14T20:08:49Z")

</div>

I think I fixed it. It’s better to do this in some test project.

1. You need to go to the folder:  
\*…YOUR\_UNREAL\_PROJECT\Plugins\Traffic\Source\MassTraffic\Private\*
2. Open the file **MassTrafficVehicleComponent.cpp**
3. Find function **“FMath::Sign(WheelLocalLocation.Y)”** and replace it with “-1”  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/9/e19f4efa12fec797b2706c347642107d734d7543.png)

it should turn out like this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/3/6/836ded072bf67e2f7d6fd76f5877d7d1308f53cc.png)

1. Save this cpp file and close.

2. Now you need to rebuild the project. To do this you need to install Microsoft Visual Studio 2022 with this addon “Game development with C++”. You may also need .NET SDK 6.0.302  

3. If you already have Visual Studio, then just run the project and click “Yes” when Unreal displays a message about rebuilding. After rebuild the project will open and the wheels should work correctly.

_P.S.: This is of course a crutch and I don’t know how it might affect in the future. Perhaps now the wheels won’t be able to rotate backwards when reversing. I don’t know. But for now it was enough for me._

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [December 14, 2024, 8:09pm UTC](https://forums.unrealengine.com/t/masstrafficai-the-wheels-on-the-right-side-of-the-car-are-turning-in-the-wrong-direction/2120173/3 "2024-12-14T20:09:39Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
