Animated vehicle drives left and right not forward how come?

Check that the script is changing the Z axis instead of the X axis

Okay, so I rigged my vehicle up and made all of the blueprints etc. But when I press play and I drive forward it drives to the left and when I drive backwards it drives to the right. Why is this happening? My vehicle is facing the ‘X’ axis and I have checked the input and everything looks fine it just drives left and right. The animations play fine too.

Anyone know?


Were is the script located at? Sorry, I’m a bit new to UE4 and animating. Thanks for your time :wink:

It should be in the event graph for the vehicle

Sorry, I still cant find were it would be in the event graph. Could you provide me a screen shot or a specific location of were the option is? Thanks! :slight_smile:

Well what script do you have currently?

I’m currently using a Blueprint script I do not use c++ I’m new to UE4 so I don’t know a lick about codeing lol. I have a Input axis forward that has a W key set to 1.0 and a S key set to -1.0. I then have a Right Input that’s controls the left/right right 1.0 and left is -1.0.

I would need to see a screenshot to understand where thing are going wrong.

I’d recommend taking a look at the vehicle template project. This is the script used in it -

This is my script.

And thats the Anim Graph.

Oh you are doing it trough animation. I’m not 100% sure what you are targeting there. If you are targeting based on rotation make sure you are targeting pitch. I’m more of a programmer than an animator so I’m not sure how or if that method would work

Judging by the demo project you still need to program the cars movement. You can’t rely on animation

Check what axis your vehicle is aligned in your 3D program. The mesh needs to be aligned towards the positive X axis (i.e. the head lights look towards +X and the tail lights towards -X).

Having your vehicle drive sideways is usually happening because of it facing Y instead.

Ya I noticed that in 3DS Max It was facing the Y axis so what I did was when I imported it in UE4 I made the Import settings to offset the model 90’ so I would face the X axis and that worked. Also @elitegameguy those node make the tires look at the axel so the suspintion would work so far that’s a success just that the vehicle drives sideways.

Also what do you mean by I need to program the vehicles movement???

Image of my axis. Is this a correct axis?

NOTE: When I first imported my vehicle it was facing the ‘Y’ axis so I redid everything. I deleted the blueprints and the Skeletal, Physics Asset etc. I then rotated it to the X Axis in 3DS Max but when I imported it to UE4 again It was facing the ‘X’ axis but the bones were still facing the same ‘Y’ Axis so what I did was I put the vehicle back to the ‘Y’ axis in 3DS Max and when I Imported it again I had went into the Import settings and offset the vehicle to -90’ to the left and that fixed it and the bones were even rotated with it so that’s not a problem even though it is facing the Y axis in 3DS Max but it was converted to the ‘X’ in UE4? So is that okay?

Maybe one of tires isn’t rigged correctly or maybe the wrong axis is targeted in you script. TO be honest I’m not entirely sure why it isn’t working

Your vehicle is on the wrong axis. You need the front of it to be facing the y-axis
Y-axis = Forward/Back
X-axis = Left/Right
Z-axis = Up/Down

I didn’t see the script. Ignore that comment

No. If you read my comment above you’ll see that it was on the correct axis when it was imported