Slowly face a direction

Hi there,

I’m trying to write some code that will make an object face an angle I give it at a certain speed. So far, it either does nothing or completely flips the hell out.

Anyone have any theories?

Use math.approach on angles?

I was running into 2 issues on that:

  1. When the angle would go from -179 to +179 or 359 to 0, it would go all the way around instead of going 2 degrees to the right.

  2. I was hoping to perform the movement with physics instead of


entity:SetAngles(ang)

but I’ll settle for setangles if need be.

Approach the other direction using negative numbers.