Forum rules - please read before posting.

Player Stalling at Markers? (Mecanim + ActionList)

edited October 2015 in Technical Q&A
Hello! I've been trying for the last few days to create an ActionList that will allow my character to sit upon a chair when the chair is clicked.

My hotspot is set to make the player walk to "Marker A", which is located just in front of the chair. The structure of my ActionList is currently:

1) Object - Send Message
The chair in the scene has a script attached called ColliderSettings. This action sends a message to run the method "KillCollider", which disables all colliders on the gameObject. This lets the player (which has a capsule collider and rigidbody) move into the chair's space.

2) Character - MoveToPoint
Now that the chair's colliders are disabled, this moves the character to "Marker B", which is located underneath the chair.

3) Character - Animate
This changes the "Sitting" parameter on the player's animator controller, causing the proper sitting animation to play.


What actually happens when I click the chair is this:
1) The player moves to "Marker A" as expected. The player is now standing in front of the chair, facing it.
2) The chair's colliders are disabled as expected. The player should now be able to move into the former chair collider space without issue.
3) The line in Scene view that shows the player's path to "Marker B" is drawn ... but the player just stands there unmoving.
4) Only when a movement key is pressed does the player start to walk along the path to Marker B.
5) The player sits in the chair as expected.

Here's a video of the problem in action: 
The player only starts moving again at 1:34 because I pressed "W".

I originally thought that maybe Marker B originally being within the confines of the chair's collider was causing the issue, but even when I move both markers far from the chair, the problem still persists. It seems like there's some kind of issue between using the "Move to Marker" option on the hotspot and the "Character - Move to Point" option in the ActionList?

I'm quite sure I'm doing something horribly wrong, haha. Anyone have any tips or any idea why the walk to Marker B seems to not be triggering properly?

Comments

  • I take it you're using Direct control for movement.  Is the ActionList asset set to Pause Gameplay, as opposed to Run In Background (as set in it's Inspector)?

    What's your pathfinding method?  Does it work if the "Character: Move to point" Action has "Pathfind?" unchecked?

    I wonder if this is a bug.  Try temporarily changing your movement method to Point And Click - does it work then?
  • Ah, I knew I was forgetting something! I had it set to "Run in Background", and it looks like setting it to "Pause Gameplay" has fixed the issue. 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.