So far I have been using this script for moving rigid body 2D.
var lv = s.get_linear_velocity()
var step = s.get_step()
#other logic changing lv.x and lv.y
lv += s.get_total_gravity()*step
I read that I should not set linear velocity every frame so how and with what can I replace it?