Forum rules - please read before posting.

NPC Move On New Path / Animation Settings Mecanim / Manual

Hello!

I have a question that I'm hoping can be solved without going over to Motion Controller.

My NPC Animation Settings are set for "Animation engine: Mecanim" and "Motion control: Manual". Everything works quite well for the entire game.

At the end, when you win, the NPC is supposed to run off on a Path. I have created the Path, set the Animation to "Running" and he only runs in place using the Cutscene ActionList.

I understand that is because the Motion Control is set to Manual. When I set the Motion Control to Automatic, it works just fine, but then the NPC doesn't work correct in the game.

I am wondering if there is a way I can just turn on the Automatic for Motion Control in the ActionList when I need the NPC to run along the path or how I can make the NPC move along a Path in code ( such as setting the speed, path, etc ). I have looked at the AC.Char and I think it's somewhere in that.

Thanks!

Comments

  • I'm confused by your wording, because you say it "works just fine, but the NPC doesn't work" - which part is working fine, and which part isn't?

    If you want to move an NPC along a path through script, you just have to call the SetPath function:

    myNPC.SetPath (myPath);
  • Chris:

    "works just fine, but the NPC doesn't work" correct in the game.

    The second part explains that the NPC doesn't rotate correctly, and various other movement issues since I have custom script moving the NPC also.

    I believe the myNPC.SetPath(myPath) is the answer I was looking for. 

    Thanks!

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.