I'm making a game where the player has one overworld unit that moves around and can enter grid based battles in another scene that use the whole party, excluding the overworld unit. My game start event has the overworld unit join the active group, then leave the battle group, and hide member after that. In the grid battle, the first unit always has components for Character Controller and Player: Button Controller (disabled). This first unit will also get misaligned from the grid sometimes after moving.
image
It doesn't happen after every single move, but it only happens to the unit that gets those components.
  • Try setting the combatant to the cell's position at the end to make sure it's placed on the cell - might be that the move just gets stuck on something sometimes and doesn't move to the exact position.
    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!
  • I'm still not having any luck. I'm using the same move command event as the grid tutorials. I've added another Change Position node between the Grid Cell Event node and enabling the collider, set up the same way to move to the found object cell, but it's just not doing that, and I'm not sure why. I've also tried disabling and enabling the Character Controller component of the user in the event, just like disabling and enabling the colliders of other combatants in the path, but that's also not working. It's hard to say for sure because it doesn't happen every time, but in my testing, if I manually disable the Character Controller, this problem no longer happens. I feel like it has to be the core of the issue, because it's only the unit that has the Character Controller that does this, but I'm at a real loss on why I can't disable it in the move event.
  • Since you're working in 2D, you should use a custom 2D player control - ORK's built-in controls and the Character Controller are for 3D games, but that shouldn't really cause this issue.

    Try adding a Wait node (e.g. 0-0.1 seconds) before enabling the components again.
    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!
  • For now I've been "cheating" by still having everything in 3D- all of the sprites are attached to cubes, stuff like that. There's a lot more information for 3D out there, and until I'm comfortable enough to write my own custom control, I'm sticking to what I know.

    The wait node seems to be working so far, thank you. I noticed that the movement also pauses for that .1 seconds now, then moves the last little bit to the center of the cell. In the Change Position node, I have it set to wait until movement is done before moving to the next step, so I'm not sure why the combatant is still in motion a couple nodes down the line.
  • I added a wait node to the movement loop, right after the Change Position node, and every combatant's position is stopping .2-.3 short of the center of each cell in whatever direction they're moving along the grid path. I added a debug line at the very end of the move event to print the combatant's position to the console, and they're all .2-.3 off from center at that point, but do move to the correct position. But apparently that movement happens after the move event ends...?
  • Hm ... might that be the combatant radius?
    Try enabling No Combatant Radius in the movement settings of 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!
Sign In or Register to comment.