• You can use the Grid Orientation Selection node to start the grid orientation in an event - setting up the orientation selection using hover selection and rotation to selection should have it work that way.

    The built-in first person camera is pretty simple, so you might need a custom control for that. X-axis input will rotate the camera target (i.e. the player) before positioning the camera on the target's defined child object. It'll just rotate the transform, so depending on your player's prefab setup that might rotate the wrong object ... maybe pause the game and check what's rotated :)
    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!
  • Going back to using numbers since I'm asking about multiple things. :)

    1. Okay. That's super helpful and amazing. Thank you. I am having a problem though where the ray-cast for what cell to click on is being intercepted by the player prefab (I'm using a third person camera set up where the camera is about a meter and a half behind the player prefab and pointing roughly at them.) I've had this same problem with ray-casts for targeting abilities in the past. Is there an easy way to make the ray-cast ignore the player? (I know abilities have a checkbox for ignore user, but it has not stopped the issue from occurring so I have to wonder if there is something else getting in the way?)

    2. As far as I can tell the only thing that is rotating is the camera object itself.
  • 1) Use the layer mask setting of the grid setting's raycast for that. Usually you want to have your ground and combatants on separate layers for that :)

    2) Did a quick test, definitely working here. How's your player's prefab set up?
    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!
  • 1) Well this is all sorted!

    2) I've got a Game Object (layer: default, untagged) that has a transform, animator, character controller, rigidbody, capsule collider, and damage zone. It's got 4 child objects: the Armature root (which has the entire armature as child objects); the model (transform+skinned mesh renderer); an equipment viewer (transform + equipment viewer) for clothes/armor/hair/anything else we want swappable; and an empty game object named "CameraPoint" that's just got a transform which is used as the child object for the camera to point at with the Use Child Object for the Mouse type camera controls. Without that the camera always aims at the combatants feet.
  • 2) Which player controls are you using?
    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!
  • 2) Player Control Type is set to Button. Camera Control type is set to Mouse. Is that what you're looking for?

    If so the player controls set up is currently:
    SC block control enabled, SC destroy player disabled, move dead enabled, use combatant speed enabled, gravity -9.81, speed smoothing 10, rotation speed 200, first person (enabled), use camera direction enabled, camera direction offset 0, vertical axis (vertical, positive W/negative S), horizontal axis (horizontal, positive D/negative A), play fall animation enabled, play land animation enabled, min fall time 0.2, use jump key enabled, use sprint enabled.
  • 2) Ah ... ok - yeah, you'll need to use the First Person camera controls for that. It's the camera control that does the rotation here, not the player control.
    The button control's first person option will change it to strafing mode instead of rotating via horizontal input.
    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 June 11
    Alright! that makes sense. Somehow I missed that that was a thing the handful of times I read over camera control types. =\ Still, this gets me so close to what the control scheme I'm looking for!
    Changing it to First Person camera controls, I've set it's input keys to two new input keys that use the Unity Input Manager origin for the Mouse X and Mouse Y. That's let me use mouse look with first person controls. Which is amazing! This is most of what I've wanted! But it does lead me to a couple of new questions:

    1) is there a way to make the cursor go away when not in target selection or in a menu? I'd like to have it for navigating menus and dialogue choices, and maybe for picking which hex you shoot a projectile at, but not when you're just running around and moving the camera around.

    2) is there a way to change the control scheme when doing target select? (if so this may solve the above problem)

    3) is there a way to make a character strafe/backpeddle when moving to a new hex? I.e. move to the new hex without changing orientation and using a different animation and move speed. I was thinking of making the "Move Left"/"Move Right" and "Move Back" abilities create those movements without changing the orientation from whatever it was before that.
    I figured out how to return their grid rotation after the move to what it was before (but only for moving backwards, it doesn't work for the strafe, idk why), which is mostly good except that the camera points in the direction their moving instead of in the direction they're supposed to be "aiming" which I'd like to find a way to change.

    4) With key code inputs is there a way to have an input require multiple keys to be pressed at once, and for one that requires multiple keys to override one that only requires one key? I'm thinking of the strafe left/right keys moving you to the hex to the front left/right by default, but swapping to back/left right if the back key is also pressed.

    5) Final question, currently with chaining the "one step forward" ability the characters move animation gets reset with each step. Is there a way to get it to flow?
    Post edited by Whatexists on
  • 1) Have you tried the Lock Cursor option in the first person camera control?

    2) No.

    3) The movement nodes usually have an option to Face Direction of movement, simply disabling it should move the game object with their current orientation.

    4) Check out the ORK Input Key input origin - that allows you to use other input keys, e.g. requiring shift+another input to be used at the same time.

    5) You could have this within the battle event of the move abilities instead of firing the ability again. I.e. at the end (or during the move), check if the input key is still held down, and continue moving in that case (i.e. looping back to the start).
    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!
  • Awesome. I'm going to go give that stuff a whirl!
  • edited June 11
    1) I hadn't. I didn't see that in my first pass over this morning. Works perfectly. Thank you! =)

    2) that's fine. #1 resolves the need for potentially doing that. =)

    3) Oh hey! So they do! hidden right in plane sight, cleverly disguised as exactly what I was looking for! (as my dad always said) =)

    4) Alright. I'll check that out and see if I can get it working!

    5) what type of node do you use for that? I can't find a check input node. Would you use a wait for input key node?
    Post edited by Whatexists on
  • 5) Yeah, Wait For Input node it is :)
    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!
  • 5) alright! this works like a charm! (Just in case anyone is reading this thread and trying to do something similar: I did have some problems relating to the character spinning in place after moving one step instead of chaining steps, but that was because I forgot to change the "Change Type" to "Set" from "Add" for the "Store Grid Cell" node.)
  • So more questions, these ones relating to Camera Control stuff

    Currently the Camera is over the shoulder of whichever character you are currently controlling. If you are controlling no characters, such as during an enemies turn, it reverts to the player.

    Is there a way to get the camera, on an enemies turn, to switch to the closest allied unit to the enemy?
  • If you're using one of the built-in controls (or use a custom control extending from ORK's base camera control component), you can use the event system for that. The Camera Control Target node lets you switch the target of the camera and you can e.g. use a Search Combatants node to search for nearby combatants via range checks.
    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.