Define lerp axis through inspector

Hey guys,

Is it possible to define an axis for an object to lerp on in the inspector?

Wow it looks to me that you are overthinking this, but maybe I’m wrong, let’s see.

Why don’t you use the lerp from Vector3 class? It may suit your purpouses better.

Otherwise, I think you are trying just to move a thing smoothly. Why don’t you move it normally but you make the velocity itself to be lerped.

Another option is to make a class that can be set through the inspector and does this:

[System.SerializableAttribute]
public class Axis{

   public enum AxisStateMachine{
   Xaxis,
   Yaxis,
   Zaxis,
   }

   public AxisStateMachine axis;
}

Then you would be able to use this class in your weapon and make a more complex function that would take into acount the information of the axis to do as you want, and you would be able to set the axis through the inspector.

Hope it helps.