edited February 1 in ORK Support
Hello, I'm new in using orkframework and not native english-speaker.

I did the tutorial "2D Grid Battle RPG" (with some difficulties and bugs) and I'm currently reading other tutorials too. Following the things in the tutorial, I try to make a 2D RPG on my own using the Top down controller 2D with the paid version of Ork. But I have two big problems.

- "2D Grid Battle RPG" : The princess has a strange animation behavior. For example, the princess walks to the East but when hitting the border collider, the princess immediately face West, even if I keep holding the key to go east. It's the same problem with other directions.
I didn't mind at first, but it bother me now, especially when I want to make interaction. How to interact when the character immediately turn back after touching a collider ? I made a lot of test, and I think that the collider made the parameter "xDirection" (or "yDirection" for vertical movements) change to opposite. I don't understand why or how to prevent it. I expanded the interaction zone of my player to have it interact even on back, but it's not a clean solutions.

- I followed a tutorial in 3D série to learn how to collect item. I tried to adapt to the 2D game, but when I interact with the item collector, my player disappears ! (the dialogue to collect item works and I can collect item tough). The game object is still here, but no animation is displaying and the box collider seems to have dimension 0. I can't move the game object anymore.

Is anyone having an idea to solve these problems ?

Post edited by Canelle on
  • edited July 2022
    Yeah, that's due to how the 2D sprite direction animation is set up - bumping into something moves the game object a bit in the other direction (due to physics), which change the movement direction.
    The 2D tutorial will be updated in the future to use a different setup, where the root object of the combatant rotates in movement direction, i.e. having the sprite direction animation based on rotation instead.

    For 2D, make sure to use the 2D variants for the interaction controller - they use 2D colliders/rigidbodies. Also, in the Item Collector component's Start Settings > Object Turn Settings, make sure to disable all turn options.
    Post edited by gamingislove on
    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!
  • Thank you very much for this fast answer ! You solved the second problem (I didn't see one of the turn object options).

    About the 2D sprite direction animation, I will see if I can base direction animation on rotation by myself. If not, I will wait for the updated 2D tutorial.

    Thank you.
  • Hello.

    I have update my player with the new tutorial of 2D grid battle. The Sprite and animator are on the Sprite object and now use the Direction/Speed parameters. It work fine with the player.

    But when I have a second combattant in group, with the Follow leader move IA,
    the second combattant seems to have Direction/Speed parameter staying still at initial value.

    Hear some screenshot. The red girl is the player, she has direction 0 and speed 5.9 (why this speed, I never understand since the walk speed is 3...). She walks to the right.
    The blue girl (June) is following, but facing left with Speed 5.9 and direction 2 !
    image
    Same when player doesn't move :
    image

    It's worse when the player sprint (Speed 10) : the blue girl stays at Speed 5.9 and re-spawn every time she is too far ! Re-Spawn a lot. But when she spawns, she has the same direction as player.
  • edited February 2
    Game controls move at run speed for full input, so that's why it's not using walk speed there.

    What's your move AI setup and the combatant's movement component setup?
    Post edited by gamingislove on
    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!
Sign In or Register to comment.