Download

Sprial Knights Control System Help?

So, I’m trying to make a game with a control scheme similar to that of the Spiral Knights online game. The camera would be always facing one direction, looking down at the player character from 30 degree angle (approximately). The character would move forward back left right regardless of the direction the character is facing, but rather in line with the direction the camera is facing. The character would also have its rotation facing wherever the mouse is located, ignoring any high objects the mouse is hovering over. I’m not saying I want someone to make it for me (though I wouldn’t complain if someone did), but I would really like an idea of how to do each part because everything that I am doing so far just keep resulting in stranger and stranger results, leaving me with no idea what part I am doing right, if any. Any help would be appreciated.

Maybe:

  • start with the Third Person template
  • remove the logic that uses the mouse to rotate the camera
  • adjust the camera component position to be up higher
  • disable bOrientRotationToMovement so you don’t face the way you are moving
  • make a custom PlayerController BP, set it in your GameMode, enable the bShowMouseCursor option in it
  • add some logic that takes the cursor position relative the location of the player on the screen, and turns that into a yaw value

Who’s betting we’re going to see a LOT of indie ARPGs popping up soon?

Yea, JamesG, your ideas sound quite good. Currently I have hooked up the X and Y movement for my character, though it seems to go twice as fast when going diagonally. I was unable to figure out where the camera position was being defined. I’ve been able to make a custom PlayerController BP to show the mouse in, but as far as adding logic for the rotation… I’m a mere 3d modeler/texture artist-ish. Only programming class i’ve taken is a low level java class, and that was years ago. I just want a stable base set of controls so that I can make a pretty looking game. Any chance you can be a little more specific on how to do what you said?

I’ve seen the ‘point at mouse cursor’ question come up a few times, I might try and put a tutorial video together soon.

If you want a “click to go to mouse position”, you can just deproject the X and Y position of the mouse to the world so it returns you a 3D position and then use it to create a path.