Hi.
Excuse me, I'm not good at English, so I use google translate.

I have previously asked about grid movement and received an answer, but I am not able to implement it and would like to implement diagonal movement in the roguelike tutorial, is it possible?
(I did not understand the custom controls. Perhaps I need to learn C#?)

I have tried several things, but the diagonal distance is inevitably shorter.
For example, can you make it possible to move to (-1, -1, 0) when pressing W and A at the same time?
  • Yes, that's possible.
    If you're using the Makinom roguelike tutorial, you can change the setup of the Change Variables nodes after the Input Key node to have the input from both horizontal and vertical axes.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Yes, to implement diagonal movement in Rogalike, you can modify the control script so that when you press the W and A keys simultaneously, your character moves diagonally (e.g. by (-1, -1, 0)). You will need to learn a bit of C# to modify the control logic in your script. Try adding a check for pressing two keys simultaneously and changing the character's coordinates accordingly.
  • Thank you both very much. i will learn and try.

    I would like to ask one more question: I don't want to rotate the player in the interaction controller 2D, is there a way?

    Player is represented by marker like this.
    image

    However, when the player interacts, it lies down like this.
    (It didn't work even if I fixed the Z axis with Rigidbody 2D)
    image

    I would like to solve this, is there a good way?
  • The interaction components (e.g. Item Collector or Interaction Machine) have settings for this. They can be found in the component's Start Settings > Object Turn Settings, simply disable both options there to stop rotating the interaction and player.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Great!! Thank you very much!!
Sign In or Register to comment.