Forum rules - please read before posting.

Issue with paths

I got the camera problems sorted out, but there's some weird and random behavior with paths. Sometimes the player character stops moving, and no matter what I do, Tin Pot just sticks there. The player is following path through Player: constrain: follow path action.

This randomly happens when I stop moving, but it also occurs after cutscenes, for example, switching camera. Could this be related to the looping issue Chris mentioned?

«1

Comments

  • If the Player stops moving during a cutscene, they will currently end their path constraint. Does this issue occur if you avoid blocking gameplay?

  • Yes, even if the cutscene is set to play in the background

  • edited July 2021

    What Actions does such a background ActionList consist of? Please share steps that I can recreate the issue with.

  • Camera: Switch with 5 second transition set to smooth. Trigger only changes camera
  • And how/when is it run? Via a Trigger, or a Node cutscene?

    Is the cutscene played in the background because the Action has "Wait until finish?" unchecked, or is the "When running" field specifically set to "Run In Background"?

  • It's an independent trigger, and in inspector it's checked to run in background
  • Is this included in the package you sent me? If not, send it over as an additional package.

  • No, that wasn't included in the package. I sent it to you via PM

  • Hello! I'm slowly making progress with my project, but I have another issue with paths, I hope you guys can help me. So, there needs to be junctions on the island. The player is dropped from the path when he reaches the junction. Every junction is basically a box with surrounded with colliders, and the player can choose a path he wishes to take by interacting with a hotspot. The issue is, that although the walk-to markers of the hotspots and the corresponding paths are exactly at the same place, the player weirdly teleports to the start of the path, when he interacts with the hotspot. I tested the Character: move along path action, and there the character walks from the marker to the start of the path without teleporting. I imagine this could also be achieved with Player: constrain --> lock to path action, but how? Shouldn't locking to the path work without the teleport effect when the marker is in the same co-ordinates as the origin node of the path?

  • When a Player is locked to a Path, they are currently teleported to ensure they are properly attached to it. I can look into making this optional.

  • That would be super amazing. Is there any workaround to fix this in the current version of AC?

  • The teleporting occurs due to the Teleport function calls in the Player.cs script's SetLockedPath function. You can try commenting them out, but I'd recommend waiting for an official fix.

  • That did the trick, thanks again! :)

  • Hello again!

    We're designing some platforming elements to our game, and I realised the character can't jump when locked to a path. Would jumping be somehow possible in this kind of scenario? We'd like the player to be able to jump on and over rocks and stuff like that while he's travelling on a path
  • You can "quick hack" this by opening Player.cs, and replacing:

    if (activePath == null)
    

    (Around line 266) with:

    if (true)
    

    For proper platforming mechanics, however, I would recommend relying on a dedicated platformer controller asset.

  • Okay, I'm making some progress with my project. I recently integrated UCC to work as a character controller. My question is that how can I make the UCC/AC player character to walk on AC path while Cinemachine dolly track camera is tracking the player? UCC's pseudo 3D/2,5D camera seemed like the perfect alternative for the project, but the game includes intersections, and the 2,5D camera can only track a single path, so I'm thinking the best way to move forward would be that the UCC controlled player would move on AC path and Cinemachine would take care of the camera. I've installed the integration package and setup my character with the instructions, but I can't set the player on path with the Player: set to path action. The "hack" above, would it also possible to make the UCC-controlled AC character jump while on path?

  • UCC's motion controller is totally separate to AC's Path system.

    A Paths object itself is essentially just a list of Vector3s - a custom script could feasibly be written to have a UCC character follow them, but that would be on the UCC side of things.

  • Hi Chris! I'm still experiencing some issues with AC paths. When using Lock to Path action's "snap to node" tool and assigning the last node of the path the console outputs this error:

    Invalid node target - cannot update pathfinding on AC Player

    -> AC debug logger
    UnityEngine.Debug:LogWarning (object,UnityEngine.Object)
    AC.ACDebug:LogWarning (object,UnityEngine.Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:33)
    AC.Char:PathUpdate () (at Assets/AdventureCreator/Scripts/Character/Char.cs:787)
    AC.Char:BaseUpdate () (at Assets/AdventureCreator/Scripts/Character/Char.cs:643)
    AC.Player:_Update () (at Assets/AdventureCreator/Scripts/Character/Player.cs:179)
    AC.StateHandler:Update () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:276)

    Selecting other nodes does nothing but break the path as character is able to move only a straight line if something other than the first node is selected.

    There's also a random chance that the player stops on it's tracks when changing direction. I have no idea what's causing this, as it happens at random.

  • Oh, and the AC version I'm currently using is 1.74, and I'm working with AC player player character (not UCC)

  • Can you share more details on the Path / Action's properties? Screens so that I can recreate exactly would be best.

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.