Forum rules - please read before posting.

What's the best way to switch between AC Movement and my own movement controller?

edited November 2019 in Technical Q&A

Hi,

I'm using the mecanim setting for my animation and I was just wondering what the best way is to switch between AC movement control and my own movement control. I'd like to have AC to take control during cutscenes and perhaps even utilise AC's jump control at some points. The only way I can think of doing this at the moment is by setting or clearing the animation parameters or changing the animation engine at runtime. I think it would be great if we could turn different parts of AC's movement control on and off with a switch of some sort unless there is a better way or this is the inteded way to do it?

Manual motion control still retains some control over the movement so I might as well leave the motion control setting on automatic and just set the mecanim parameters when I need to use AC movement...?

Thanks

Comments

  • This is for a player character, I take it. To clarify: when you say "movement control", you're referring to the way the user actually moves the player character around the scene? If so, elaborating on exactly what style of movement you're intending will help me understand the situation better.

    Unless you rely on root motion, then a character's animation and movement systems are separated. How/where a character moves is independent of what animations they play. I'd recommend focusing on getting the motion the way you want first, and then look into the animation side of things.

    Through script, you can switch the character's Motion control field to Manual during gameplay, and Automatic during cutscenes. For more details and links to examples, see the Manual's "Custom motion controllers" chapter.

  • edited November 2019
    Thanks for the reply,

    Yes I'm using my own script for direct keyboard & mouse player movement.

    I'm using root motion at the moment. I've had to edit AnimEngine_Mecanim.cs to take full control of my character movement because it was still doing MoveCharacter(). I've put a check to only call it if motion control is set to automatic. Is this a bug?
  • No - the character's movement speed is controlled by the motion controller. As I said, things are a little more tied together when using root motion.

    If you need to tweak the AnimEngine file, however, you can duplicate it, rename it, and use it as a custom animation engine - so that it won't get overwritten upon updating. See the Manual's "Custom animation engines" chapter for a rundown on how to do this.

  • OK thanks for your help

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.