Make vehicle turn to face direction

I have tried several things to get this to work but for some reason it’s just not happening. this logic work about 90% of the time but for some reason there are a couple cases that it doesn’t work for and I have no clue why.

basically what i’m doing is finding the look at rotation, making sure it’s positive so I get the proper value, getting the current actor’s rotation, subtracting the yaws and dividing by 360 to get a number between -1 and 1 to set as the steering value. This works almost all the time.

The targets are a series of targetpoints on the map that I have in an array and I iterate through it and when I get close enough to a point I set the current target to the next target. works pretty well except towards the end the buggy turns the wrong way in one of the corners. This is all happening on tick.

any thoughts?

Here is a comparison between when it works and when it doesn’t. The top image is when it’s working and the bottom is when it’s not:

The points are on the path in similar relative positions as other points in corners and I have tried moving them around to see if fixed it but no luck.

Ok, so I greatly over complicated this problem. The way this is done is to find the look at rotation between you and the target then use the delta rotator node to properly get the amount you need to turn. Then divide by 360 to get a number between -1 and 1 and use that for the steering value.

This approach will make a nice waypoint system that a vehicle will follow. You still need to manage things like throttle separately but I’m sure there different techniques that can be used depending on your application.

Could you post a picture of your simplified version?

Sorry for the delayed response. Didn’t notice this come in. Unfortunately I don’t have that code anymore. It was for a one-off project I was working on last year. If you need some help doing something like this feel free to shoot me an email at and I would be more than happy to help you out.