Hi,

I recently got around to adding Ootii's Motion Controller to my game so I could use his Swimming package. Currently I use his Camera Controller and it works great (thanks to @Keldryn,) allowing for nice camera control and switching to ORK's camera during turn-based combat events.

Maybe I don't have everything set up right but in turn-based combat, the player simply stays in place, facing away and in a constant run animation. ORK doesn't seem to take control of the movements like it does with the camera.

Am I overlooking a simple setting here?
  • Is your player's combatant using auto animations and is animated by battle events?
    Also, is the player control blocked and the custom control set up in ORK?
    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!
  • Hmmm... I've had it working well in turn-based combat. I still have a prototype around here somewhere.

    I'll load it up and check through the settings I used. Might be a day or two before I have called chance to look.
  • Yes, my combatant is using auto animations and animated by battle events. I've blocked control and set the custom control as well.

    I'll post screencaps of my setup when I get home.

  • Just checking in with you... I haven't really had a chance to do this yet. :-) My wife's laptop had to be sent in for repair, so she's been monopolizing my computer every night (she does have legitimate work to do). I'll hopefully be able to get to it over the next week.
  • @Keldryn Hey thanks! No hurry. I actually have been diverted to working on some Quest Machine/Love-Hate/Dialogue System stuff so my controller work has been on hold for the moment.

    I normally test assets out by using them in a fresh ORK tutorial project and gradually adding functionality then following the steps in my game. I tried a fresh test last week and ORK was properly blocking controls. The player ran properly to the target and returned properly however. (My Mecanim had not been set of course and it was using run for the idle animation since it used the default Ootii animations.)

    So, I need to check what's exactly different in my game vs. a fresh install. Something is keeping ORK from blocking controls and initially pointing the player away from the target.



  • @FancyFerretStudios - Are you using ORK to handle the animations in turn-based combat then?

    Motion Controller pretty much takes over the animator, so you're bound to run into conflicts in short order if this is what you're doing. Are you sure that ORK isn't blocking controls correctly? It might just be Motion Controller applying the default rotation to the character, unaware that ORK is trying to rotate the character as well. Motion Controller processes movement and rotations in LateUpdate(); ORK's ActorEventMover processes during Update(), so Motion Controller is always going to win that battle. ;-)

    You can make ORK override Motion Controller if you create a new Layer on your Animator Controller below all of the others (it has a higher index, but is visually below the other layers), set to Blending Mode: Override and Weight: 1. You will also need to create an Avatar Mask with all of the body parts selected and assign that to this layer. Now whatever you play on this layer will override anything Motion Controller is doing on the lower-indexed layers. It won't stop the current active motion from moving the character, however. I don't really recommend this approach as a long-term solution, as the MC is still running its motions as normal; it's just not animating them.

    You could also use a conditional prefab in combat (for each Combatant) that doesn't have the Motion Controller or Actor Controller added to it. I find this approach to be a lot of extra work.

    My preferred solution for handling turn-based combat is to keep using Motion Controller for that as well. Any Battle Events that move the character can be set to just move the Transform. When the "Use Transform Position" option on the character's Actor Controller is enabled, then he'll animate properly as the Event Step moves the character.

    I've got a set of custom Motions for use with turn-based battles in ORK. They're all quite simple (in comparison to the real-time motions from the Motion Packs), and they generally work by:

    1. Start playing the battle animation (i.e. Attack)
    2. Wait for the specified animation event to fire (i.e. "hit")
    3. Run a callback on the Activate Motion event step that activated the motion. In the case of the ORK_SimpleAttack motion, this allows the Battle Event to run the Calculate step, play sound effects, and add/remove particle effects correctly timed with the animation.
    4. If the motion doesn't wait for an animation event, it will run a callback on the Activate Motion event step once it has completed.

    (Actually, now that I think about it, I'd like a motion to be able to perform a callback both when the animation event fires and when it completes. I probably need to write a separate Wait For Motion Completion event step for that).

    I'm currently working with Tim (ootii) to update the whole suite of products to support the use of Assembly Definition Files (.asmdefs); this requires a significant overhaul of the folder structure. We've also added a significant chunk of my custom extensions and tools into the base Motion Controller asset itself. This will make it significantly easier to share things like the Motion Packs I've developed for Kubold's animation packs or even this ORK integration. Hopefully, we'll be able to wrap this up within a week or two, and then I just need to revise my ORK integration scripts to be compatible with the new version of Motion Controller (and the rest of the ootii products). There shouldn't be too many revisions required with the ORK integration scripts, so I don't think it will take too long. Once I've done that, I'll share them here.

  • @Keldryn Yes, I was trying to have ORK handle the turn-based animations.

    Thanks a lot for all the info! I'll look into your method of using MC to also handle the animations in turns.
  • Just a quick update... The new version of Motion Controller isn't out yet, but we're just in the testing stages. So I've started on updating all of my ORK/ootii integration files. Most of the scripts need very few modifications, but I'm still not happy with how I was handling inventory, so I will probably rewrite that (again) before releasing the files. :-) The way I had it worked, but it just seemed unnecessarily complex and easily breakable, so I want to do better than that.

    Although you're not using ootii's combat system, so maybe I'll put that inventory rewrite on hold and finish all of the stuff needed for turn-based and exploration first.
  • I am actually working on an adventure game right now in Adventure Creator but also integrating Ootii's stuff into that too! (Despite prolonging my development, I switch back and forth frequently so I don't get terribly burned out on any one project.)

    I need to look at my ORK-based game again soon though. While the ORK controller was OK, the Motion Controller was going to add a lot of functionality and life.

    Good to hear there's a new version coming! Thanks for all your input & assistance.
  • @Keldryn how is the ootii controller going? I'm thinking if using Actor Controller instead of Motion Controller let me do things easier because I read that AC doesn't take over the animator.

    Do you think that is easier to do a full integration with ork right now? I also see that the Camera controller is supported by ORK now.
  • @dlevel - Yeah, I'm terrible for this sort of thing. :-) I start too many little projects and have too many on the go at once, so I never "finish" anything.

    I've also been doing a lot more work on maintaining/updating the ootii assets, as Tim was offered an amazing opportunity to work on a project for Nintendo. So he's in Japan for the next year or two, and he's very busy with that. So this takes up a fair bit of my time as well.

    Actor Controller doesn't take over the animator the same way that Motion Controller does. As for which you should use -- it depends on what you're doing. ;-)

    If you want to let ORK handle all of the animations (including the auto-move animation), you can just add an Actor Controller component and enable the "Use Transform" option in its inspector. ORK's event nodes for character movement have options to disable using the CharacterController and to enable just using the transform, so you'd need to do that.

    Just using Actor Controller works better than using the default Unity Character Controller component, IMO. But I don't think that the visual results are as nice as what you get if using Motion Controller. Of course, using Motion Controller is a bit more work to set up.

    I had a prototype with turn-based grid battles working very nicely with Motion Controller handling all of the animations. I'll try to dust it off during the next week or so and bring it up to date with the current asset versions. Ping me again in about a week if I haven't gotten back to you about it.
  • edited June 2019
    @Keldryn, The prototype is interesting. I'm considering to use Motion Controller or Invector with ORK. It's really good if you can share the prototype :)

    BTW, Instead of "run to base" like ORK tutorial, I want to perform "jump to base" like Final Fantasy X:
    https://youtu.be/NYl_UcGSQeU?t=10
    Is it possible to write a custom node in ORK (without modify ORK code and rebuild dll) because "CallFunctionStep" might not flexible enough ?
    Do you have any suggestion to do it ?



    Post edited by vivu on
  • @vivu
    Regarding the jump to base - you'd just have to set that up in the battle event to jump instead of run (e.g. play a jumping animation).
    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.