particle campfire_cosy_smoke ~ ~ ~ 0 0 0 0 1 force
particle flame ~ ~ ~ 0 0 0 .01 2 force

execute store result score x motion_calc run data get entity @s Pos[0] 1000
execute store result score y motion_calc run data get entity @s Pos[1] 1000
execute store result score z motion_calc run data get entity @s Pos[2] 1000

tp @s ^ ^ ^0.1

execute store result score dx motion_calc run data get entity @s Pos[0] 1000
execute store result score dy motion_calc run data get entity @s Pos[1] 1000
execute store result score dz motion_calc run data get entity @s Pos[2] 1000

tp @s ^ ^ ^-0.1

scoreboard players operation dx motion_calc -= x motion_calc
scoreboard players operation dy motion_calc -= y motion_calc
scoreboard players operation dz motion_calc -= z motion_calc

execute store result entity @s Motion[0] double 0.004 run scoreboard players get dx motion_calc
execute store result entity @s Motion[1] double 0.004 run scoreboard players get dy motion_calc
execute store result entity @s Motion[2] double 0.004 run scoreboard players get dz motion_calc
