set_linear_damp() of a rigidbody2d, different values for x-/y-axis

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Th0r
:warning: Old Version Published before Godot 3 was released.

Is there an other way to set_linear_damp() of a rigidbody2d with different values to the axis?

set_linear_damp(5,2)
set_linear_damp.x=5
set_linear_damp.y=2

thanks

great engine, keep up the good work =)

:bust_in_silhouette: Reply From: Zylann

There is no way to set a different damp for each axes. If you think it’s needed, you can eventually ask for it on Github, but there are ways to do it manually (and how about choosing a different damping for a diagonal axis? too specific for the engine to handle that).

You can set linear damp to 0, and write a script that will do custom damping yourself by modifying the linear velocity over time (set_linear_velocity).