Ive been making a game with movement like animal crossing, but i don't know how to rotate the player to look at the same position position as the joystick, how could i do this, how could i make it smooth and make the player still look at that direction even when not moving the joystick

  • xyz replied to this.

    Nexis Make a 2D version first. On each frame, read the joy axes and put them as components into a Vector2. Normalize this vector and that's your movement direction. Rotate the object by the angle of this vector (returned by Vector2::angle()) and move it along this vector every frame if either of joy axes is nonzero.

    There's more finesse that can be added but those are the basics.

    i dont know any of the finesse though

    I still literaly have no idea what im doing