I mean you don’t have to use behaviors at all. The collision detection and response would be the most complex to deal with though. It just depends on what you’re trying to do.
Here’s an example for handling the horizontal motion utilizing physics. I used the joyx variable to handle the left right controls, because if they are both down they will cancel. If nothing is pressed or they are canceled then deceleration will be applied opposite the velocity. If instead only one key is pressed an acceleration will be applied in that direction. For faster turning the deceleration is applied too if the velocity is opposite the direction you want to go. I used a math trick a*b<0 if a and b have opposite signs. Finally the max speed is enforced by clamping the velocity.
Global number joyx=0
Every tick
— set joyx to 0
Left key is down
— subtract 1 from joyx
Right key is down
— add 1 to joyx
Joyx = 0
— xvelocity>0
—— apply force -deceleration
— else
—— apply force deceleration
Joyx <>0
— apply force joyx*acceleration
— compare: joyx*xvelocity <0
—— apply force joyx*deceleration
Every tick:
— set xvelocity to clamp(xvelocity, -maxspeed, maxspeed)