Forum rules - please read before posting.

Can you walk a ufps person?

Is it possible to make a ufps player walk to somewhere with AC? Like if I want him to stand in an exact spot that he needs to be in when I trigger sitting down, in order to hit the chair? That would be awesome.. he would need to rotate too, is any of that plausible? :) Having lots of fun with AC here btw, so much work saved by it every minute that goes by. 

Comments

  • The Character: Move to point etc Actions should still work with a UFPS character - have you tried them?
  • Yes I tried that, doesnt seem to do anything for me. No console messages either. Tried moving him to a marker without pathfinding but he shows no signs of moving, tried with animation settings : mecanim - automatic  and mecanim manual. As well as trying with "isplayer" ticked and not, and trying to move along a path. With move along a path and "teleport to start" ticked my player did teleport but did not move along the path after that. Without teleport to start nothing happens, and no messages in console. 

    Bare in mind this is a heavily customised ufps guy, although most things seem fine apart from this. I almost wouldnt imagine it to work without disabling parts of ufps in some way to do this? 
  • Btw I have no default navmesh assigned, I assume you dont need one for moving a player along a path since all my other npcs work without it.. I tried making a navmesh but I think something is going wrong because I cannot see it even when i untick disable nav mesh renderer, and the "mesh filter" appears to be empty, is that usual? I doubt I will really use navmesh in this game so hopefully can live without that.
  • Did you try making an Unity's navmesh to test? Just make sure the agent size and height, etc is properly setup, else you may end up with an empty navmesh or a very holey navmesh.
  • Good point I will try that. But there should be no need for a navmesh right? If I just want to move a Player/NPC along a path with no pathfinding ?
  • If you're referring to the Pathfind? option in the Character: Move to point Action - no, it shoudn't be necessary.  You do need to ensure Wait until finish? is checked, however.

    It's important to learn if this is due to this being a UFPS character or not.  Remove your UFPS player from the scene and place the Demo game's player prefab, Tin Pot.  He's equipped to work in AC's own First Person mode - and if he isn't able to move with the same Action, the issue will lie with your scene rather than your player.
  • Good thinking. Note that my experiments right now are with "character: move along a path" (which has no "wait until finish?".  Tinpot behaves the same, he teleports but does not move along the path, if I remove his player script and replace it with an NPC script he moves along the path as expected. So I tried this on my player, it teleported him to 0 then moved him to node 1, then stopped (the path has 5 nodes btw), and when I tried to walk he sort of slowly gets dragged back to node 1, the camera sort of jerks from side to side during this. With mecanim manual as his npc animation settings he teleports but does not move to a node and is not dragegd back when I walk.

  • I also tried Character : Move to point but it has no effect, and with wait until finish? ticked it just stays on that part of the actionlist forever. 
  • edited May 2017
    Ive been thinking this wont work because my animator object is inside a main game object that holds all the ufps stuff, ie, not the root game object. I will experiment with a fake npc that looks like my player and can hopefully mimmick the player without any visual glitches (ie make player invisible and use a npc that looks like the player). Seems like the only route so far with my current set up... and may work..

    Edit: actually im just going to make a custom script that moves a ufps guy along towards a marker, animates his legs so he appears to be walking, then returns to an actionlist, this should basically do what I want. Thanks for the help guys! Exciting times :-)
  • OK so I managed to make a custom action that can make my guy walk to a position, and perform an animation, works quite nicely, apart from one issue that is after it finishes running the focus is lost from the game window (a left or right click fixes it), any reason why this would happen? Doesnt happen after normal actions. 

    Custom actions are very cool btw, I may have to rewire parts of my game using them now I understand them.
  • Without knowing what the actual code is within the Action, I can't say.  It could be the case that this is an Editor-only issue, however.
  • Can I PM you the code? Its standard stuff nothing that messes with focus thats for sure.
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.