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?
    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.
Sign In or Register to comment.