Hi,

I have a 2d game setup with ork, i use a custom player controller and camera controller. I have implemented grid battles and everything seems to work fine (highlighting, combat, etc,...).

However movement doesnt work reliably, sometimes it works, sometimes it doesnt move and keeps hanging on the move command event.

I dont use the player controller to move the character when in battle, so it just uses the transform component.
The horizontal pane is also set to XY in the game settings.

Things i found:
Enabling secure move on the change position node fixes the problem but makes the movement look bad. The character moves for a bit sometimes, or just teleports to the target.

Sometimes, with secure move off, the combatant does move correctly, sometimes it doesnt, i dont really know the reason why.

Any idea what the problem could be? Or a way to make the movement with secure move smooth?

Thanks in advance!

  • Could you post the settings you're using in the Change Position node?
    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!
  • edited August 2020
    Thanks for the reply

    Here is a screenshot of the Change Position node

    https://imgur.com/a/NHUDhIT

    I have foundb the collider doesnt get disabled however (i use a box collider2D). when using the enable node, how do i access a box collider2d?
    (Collider and Collider2D dont do the trick)

    thanks in advance
    Post edited by dendiee on
  • Hm, using Collider2D should actually do that - as the 2D box collider inherits from that class (same as the regular 3D box collider inherits from Collider).

    Have you tried using straight up BoxCollider2D?

    Also, how far is the distance the game object would move?
    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!
  • The box collider gets disabled, but the previous problem still persists.

    The distance is a max of 5units on either X or Y (5grid cells).

    The character sometimes starts the proper move over time, but then after like half a second, it teleports to the target cell.
  • I'll do some tests this week.

    I guess this is during a grid move event, cycling through the path's cells?
    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!
  • Yeah this is with a movement event, i added a screenshot to further show the event in more detail.

    https://imgur.com/a/VTvzzKk

    Thanks in advance
  • That event looks like it just moves 1 cell on the path - check out the grid battle tutorial's move event setup, you need to loop through the cells to follow the path.
    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!
  • That fixes the "The character sometimes starts the proper move over time, but then after like half a second, it teleports to the target cell." problem. It used to move one cell then teleport to the target cell.

    I found its only in the Y direction that the character has trouble moving and just teleports.

    Is there a seperate plane selection or something for movement? Or what could cause this behavior?

    Thanks in advance
  • If your Horizontal Plane setting in Game > Game Settings set to XY that should work correctly.

    Maybe try disabling the Ignore Height Distance setting in the Change Position node.
    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!
  • The Horizontal plane was already at XY.

    Disabling the Ignore Height Distance setting fixed it! No idea why tho, thought it would count for z-axis, but works good now!

    Thanks a ton, for the great asset and great (and patient) support! Ill be sure to make a review :)

  • Seems like that's a bug, ignore height isn't used correctly in all cases in XY environments. Will be fixed in the next update :)
    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!
  • edited March 25
    Oh no; since updating, ‘Ignore Height Distance’ actually breaks all of the instances I use it, in my case! Now everyone sinks into the ground because they're not ignoring Y height; in fact it has the same behavior with it on or without.

    What exactly was changed?

    EDIT:

    Oh, changing the Default Horizontal plane to XZ fixes this? Oh no, have I actually been in the wrong base setting this whole time?(!) :V
    Post edited by Kirb on
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
  • edited March 25
    There's been a change to the horziontal plane setup in ORK 2.31.0, making it easier to switch. Now, the horizontal plane setting in the game settings controls everything, while the individual parts can optionally override it.
    Previously you had to change the horizontal plane in various places, making it a bit too complex.

    Which to horizontal plane to use depends on the project, XZ would be the 3D (Y-axis is height) and XY the 2D (top down) variant. For a side-scroller, XZ is probably better, as Y is still your height axis :)
    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!
  • Gotcha; I had always had set it to XY (obviously incorrect, in hindsight!) without really thinking as to why, haha. Thanks for the clarification!
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
Sign In or Register to comment.