How to smoothen single float

So the question is pretty simple, but i dont know how to achieve this.

What i have is a physical wheel that recieves torque. Im using get physics angular velocity to recieve rounds per minute info from this wheel (WheelRPM) variable. The problem is that when the wheel recieves somesort of obstacle or impact the value changes too fast. Also the (WheelRPM) variable is linked to sound. Upon obstacle things get a little jijijittery.

So the question is that is there any way to lets say… dampen (WheelRPM) value. It would be good if i could get some sort of smoothing for 0.3 seconds.

I dont mind the wheel motion being jittery but i need to smoothen the float a little bit.

I couldnt use the Finterp since i dont know what the target is going to be, its a simulation afterall :smiley:

Hope i dont sound too complicated :smiley:

Thanks

Got a video of the problem?

Sure

For info, the white rotating stick just gives me a visual indication of the Engine RPM’s , if youre wondering what it is :smiley:

Without looking at your setup is a bit hard to help, but - here’s my suggestion:

Use a Clamp on your float. If you are calling your function via Tick or a timer, simply clamp the RPM value to +/- a percentage of that float.

Example for clamp values:

Save the PreviousRPM as a variable and then on the current frame:

Current RPM = Clamp(Min, Max)

Min = PreviousRPM0.9
Max = PreviousRPM
1.1

This keeps the RPM within 10% of its previous value.

Hopefully this works :slight_smile: