Hi,
I’ve been working on some issues with player movement, I wanted to share here for feedback on how it’s working, and also in case there’s been something built into the standard controls that I’ve missed that I could use to do this better.
In my game players are in an isometric maze (so with a fixed camera angle that can’t be changed) and will run around it.
Using the standard roblox controls you will always move straight up/down/left/right by pressing WSAD
Because of the isometric view these angles are ‘wrong’ here and it makes running down a corridor a lot harder than it should be.
My first attempt to make this better was to rotate the control movement vectors so that they align with my camera view. I couldn’t find any customisable properties for this, so forked the player ControlModule and it’s a fairly simple change in there to fix how the moveVector is calculated.
This feels better, walking in a straight line down a corridor is easier. But as the corridors and corners are quite tight it is hard to move smoothly, and its still easy to get stuck trying to turn a corner
My final change was to customise the movement logic to keep the player moving in the direction they have chosen, until they hit a wall, when they will stop. If you press to change direction while moving I’ll wait until you are in the middle of a grid cell and then raycast to check that there is no wall in your requested direction. If the path is clear then you change direction. If not you keep on moving until there is a gap.
What this means is that if, for example, I’m here in the maze
I’ll keep moving forward. if I press “up” at any point before the junction, shown by the green line, I’ll turn when I get there.
It would be really useful to get some feedback on this, I’ve put together a test game here
There’s a button at the bottom which should toggle through the different movement modes.
I’ve tested this out on PC and tablet. I don’t have a controller here at the moment, if anyone does and would be able to see how/if this works on that, it would also be really helpful.
Thanks in advance,